diff --git a/Editor/ProxyCall/ConfigProxyCallPolicy.cs b/Editor/ProxyCall/ConfigProxyCallPolicy.cs index e6e9658..63317f2 100644 --- a/Editor/ProxyCall/ConfigProxyCallPolicy.cs +++ b/Editor/ProxyCall/ConfigProxyCallPolicy.cs @@ -20,11 +20,24 @@ namespace Obfuz.DynamicProxy ITypeDefOrRef declaringType = method.DeclaringType; TypeDef typeDef = declaringType.ResolveTypeDef(); // doesn't proxy call if the method is a delegate - if (typeDef != null && typeDef.IsDelegate) + if (typeDef != null) + { + // need configurable + if (typeDef.Module.IsCoreLibraryModule == true) + { + return false; + } + if (typeDef.IsDelegate) + return false; + } + // doesn't proxy call if the method is a constructor + if (method.Name == ".ctor") { return false; } - if (method.Name == ".ctor") + // special handle + // don't proxy call for List.Enumerator GetEnumerator() + if (method.Name == "GetEnumerator") { return false; }