Pin type position when a nested type has a RuntimeInitializeOnLoadMethod
parent
5680d7ef39
commit
b3ef0049fc
|
|
@ -65,7 +65,13 @@ namespace Obfuz.ObfusPasses.SymbolObfus
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return type.Methods.Any(MetaUtil.HasRuntimeInitializeOnLoadMethodAttribute);
|
return HasRuntimeInitializeOnLoadMethod(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool HasRuntimeInitializeOnLoadMethod(TypeDef type)
|
||||||
|
{
|
||||||
|
return type.Methods.Any(MetaUtil.HasRuntimeInitializeOnLoadMethodAttribute)
|
||||||
|
|| type.NestedTypes.Any(HasRuntimeInitializeOnLoadMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsPositionPinnedMethod(MethodDef method)
|
private bool IsPositionPinnedMethod(MethodDef method)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue