更新时间:2022-05-17 10:22:50
它告诉NGEN,这是OK内联它的应用方法,即使在不同的装配。
It tells NGen that it is OK to inline the method it's applied to even in a different assembly.
例如:
String.Equals
的 [TargetedPatchingOptOut]
String.Equals
String.Equals
通话,与实际code的方法替换方法调用指令。String.Equals
has [TargetedPatchingOptOut]
String.Equals
String.Equals
call, replacing the method call instruction with the actual code in the method.不过,如果微软发现在 String.Equals
安全漏洞,他们不能只更新 mscorlib.dll中
,因为这会不会影响你刚才NGen'd大会。 (因为它有没有引用原机code String.Equals
)。
我认为,如果这是实际发生的,此安全更新将清零NGEN店。
However, if Microsoft finds a security hole in String.Equals
, they cannot just update mscorlib.dll
, because that won't affect the assembly that you just NGen'd. (Since it has raw machine code without referencing String.Equals
).
I assume that if that were to actually happen, the security update would clear the NGen store.
请注意,此属性仅在.NET框架组件是有用的。你不需要在你自己的。你可以找到这里的更多信息: http://***.com/a/14982340/631802
Note that this attribute is only useful in the .NET Framework assemblies. You don't need it in your own. You can find more information about that here: http://***.com/a/14982340/631802