public static IXamlIlEmitter Ldtype(this IXamlIlEmitter emitter, IXamlIlType type) { var conv = emitter.TypeSystem.GetType("System.Type") .FindMethod(m => m.IsStatic && m.IsPublic && m.Name == "GetTypeFromHandle"); return(emitter.Ldtoken(type).EmitCall(conv)); }
public static IXamlIlEmitter LdMethodInfo(this IXamlIlEmitter emitter, IXamlIlMethod method) { var conv = emitter.TypeSystem.GetType("System.Reflection.MethodInfo") .FindMethod(m => m.IsStatic && m.IsPublic && m.Name == "GetMethodFromHandle"); return(emitter.Ldtoken(method).EmitCall(conv)); }