示例#1
0
        public static MethodDefinition[] GetMethods(this TypeDefinition type, CecilContext context, string name, MethodFlags flags = MethodFlags.All, params Type         [] arguments)
        {
            return(GetMethods(type, name, flags, arguments.Select(t =>
            {
                if (context.Comparer.AssemblyEquals(type.Module.Assembly, t.Assembly))
                {
                    return context.Resolver.GetType(t);
                }

                return context.PrimaryAssembly.MainModule.Import(t);
            }).ToArray()));
        }
示例#2
0
 public MemberResolver(CecilContext context)
 {
     c_wr = new WeakReference(context);
 }
示例#3
0
 public CecilReflectionComparer(CecilContext context)
 {
     c_wr = new WeakReference(context);
 }
示例#4
0
 public static MethodDefinition GetMethod(this TypeDefinition type, CecilContext context, string name, MethodFlags flags = MethodFlags.All, params Type         [] arguments)
 {
     return(GetMethods(type, context, name, flags, arguments).FirstOrDefault());
 }