Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
        }