Boo.Lang.Compiler.Steps.ProcessMethodBodies.CreateNullableGetValueOrDefaultExpression C# (CSharp) 메소드

CreateNullableGetValueOrDefaultExpression() 개인적인 메소드

private CreateNullableGetValueOrDefaultExpression ( Expression target ) : Expression
target Boo.Lang.Compiler.Ast.Expression
리턴 Boo.Lang.Compiler.Ast.Expression
        private Expression CreateNullableGetValueOrDefaultExpression(Expression target)
        {
            if (null == target || !TypeSystemServices.IsNullable(GetExpressionType(target)))
                return target;

            MethodInvocationExpression mie = new MethodInvocationExpression();
            mie.Target = new MemberReferenceExpression(target, "GetValueOrDefault");
            return mie;
        }
ProcessMethodBodies