Boo.Lang.Compiler.Steps.ProcessMethodBodies.CreateNullableGetValueOrDefaultExpression C# (CSharp) Method

CreateNullableGetValueOrDefaultExpression() private method

private CreateNullableGetValueOrDefaultExpression ( Expression target ) : Expression
target Boo.Lang.Compiler.Ast.Expression
return 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