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())); }
public MemberResolver(CecilContext context) { c_wr = new WeakReference(context); }
public CecilReflectionComparer(CecilContext context) { c_wr = new WeakReference(context); }
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()); }