Beispiel #1
0
        public XamlILNodeEmitResult Emit(XamlEmitContextWithLocals <IXamlILEmitter, XamlILNodeEmitResult> context, IXamlILEmitter codeGen)
        {
            var lcl = context.GetLocalForNode(this, codeGen, throwOnUninitialized: true);

            codeGen.Ldloc(lcl);
            return(XamlILNodeEmitResult.Type(0, Type));
        }
Beispiel #2
0
        public XamlILNodeEmitResult Emit(XamlEmitContextWithLocals <IXamlILEmitter, XamlILNodeEmitResult> context, IXamlILEmitter codeGen)
        {
            var rv = context.Emit(Value, codeGen, Local.Type);

            codeGen.Emit(OpCodes.Dup);
            var lcl = context.GetLocalForNode(Local, codeGen, throwOnUninitialized: false);

            codeGen.Stloc(lcl);
            return(XamlILNodeEmitResult.Type(0, rv.ReturnType));
        }