Beispiel #1
0
 protected ProxyCallFixerBase(ModuleDefMD module, ProxyCallFixerBase oldOne)
 {
     this.module = module;
     foreach (var method in oldOne.delegateCreatorMethods)
     {
         delegateCreatorMethods.Add(Lookup(method, "Could not find delegate creator method"));
     }
     foreach (var kv in oldOne.delegateTypesDict)
     {
         delegateTypesDict[Lookup(kv.Key, "Could not find delegate type")] = kv.Value;
     }
 }
Beispiel #2
0
 protected bool removeProxyDelegates(ProxyCallFixerBase proxyCallFixer, bool removeCreators)
 {
     if (proxyCallFixer.Errors != 0)
     {
         Logger.v("Not removing proxy delegates and creator type since errors were detected.");
         return(false);
     }
     addTypesToBeRemoved(proxyCallFixer.DelegateTypes, "Proxy delegate type");
     if (removeCreators && proxyCallFixer.RemovedDelegateCreatorCalls > 0)
     {
         addTypesToBeRemoved(proxyCallFixer.DelegateCreatorTypes, "Proxy delegate creator type");
         foreach (var tuple in proxyCallFixer.OtherMethods)
         {
             addMethodToBeRemoved(tuple.Item1, tuple.Item2);
         }
     }
     return(true);
 }
Beispiel #3
0
 protected bool removeProxyDelegates(ProxyCallFixerBase proxyCallFixer)
 {
     return(removeProxyDelegates(proxyCallFixer, true));
 }