Exemple #1
0
        private static void FindPointableMethods()
        {
            methodSet = new List <MethodInfo>();
            Dictionary <string, Delegate> pointerCache = cache.GetCache <string, Delegate>(PointableMethodCache);

            for (int i = 0; i < allTypes.Count; i++)
            {
                MethodInfo[] methods = allTypes[i].GetMethods(BindingFlags.Static | BindingFlags.Public);
                for (int methodIdx = 0; methodIdx < methods.Length; methodIdx++)
                {
                    MethodInfo methodInfo = methods[methodIdx];
                    if (IsPointableMethod(methodInfo))
                    {
                        pointerCache[MethodPointerUtils.CreateSignature(methodInfo)] = CreateDelegate(methodInfo);
                    }
                    methodSet.AddRange(methods);
                }
            }
        }
Exemple #2
0
 public AbstractMethodPointer(MethodInfo info)
 {
     signature = MethodPointerUtils.CreateSignature(info);
     original  = EditorReflector.FindDelegateWithSignature(signature);
     SetFromDelegate(original);
 }