hechao

Results 3 comments of hechao

> > > CompareExchange > > > > > > 跟CustomBridge没关系,怎么配都没用。报错表示指令里有个对一个需要AOT的泛型方法调用。 > > 我反编译出来看过, > > ``` > [Preserve] > public static event Invoke_Param0Int onInvoke_Param0Int; > > [Preserve] > public...

ILFixDynamicMethodWrapper这个是Patch中动态生成的,每个程序集都会有,这里的这个实例类型虽然都是ILFixDynamicMethodWrapper,但它们属于不同的程序集,只是名字相同而已,可以改一下这里的代码,这个cache加一级程序集级别的缓存就行。 ```c# static Dictionary delegateAdptCache = new Dictionary(); public static Delegate TryAdapterToDelegate(object obj, Type delegateType, string perfix) { MethodInfo method; if (!delegateAdptCache.TryGetValue(obj.GetType().Assembly.FullName, out var cache)) { cache = new Dictionary();...