TriAxis.RunSharp.CodeGen.LocalInitedFromStack C# (CSharp) Method

LocalInitedFromStack() private method

private LocalInitedFromStack ( System type ) : ContextualOperand
type System
return ContextualOperand
        internal ContextualOperand LocalInitedFromStack(System.Type type)
	    {
	        return LocalInitedFromStack(TypeMapper.MapType(type));
	    }
        

Same methods

CodeGen::LocalInitedFromStack ( Type type ) : ContextualOperand

Usage Example

Example #1
0
            public override void Emit(CodeGen g, Type from, Type to)
            {
                var l = g.LocalInitedFromStack(from);

                Type toUnderlying   = Helpers.GetNullableUnderlyingType(to);
                Type fromUnderlying = Helpers.GetNullableUnderlyingType(from);
                var  cond           = new Conditional(
                    l.Property("HasValue"),
                    new NewObject(
                        g.TypeMapper.TypeInfo.FindConstructor(to, new Operand[] { new FakeTypedOperand(toUnderlying), }),
                        new Operand[] { new ConversationWrapper(_internalConversation, l.Property("Value"), fromUnderlying, toUnderlying) }),
                    new DefaultValue(to));


                //GetImplicit(l.Property("Value"), toUnderlying, false, g.TypeMapper), l, from, toUnderlying
                cond.EmitGet(g);
            }
All Usage Examples Of TriAxis.RunSharp.CodeGen::LocalInitedFromStack