CreateUnwrapped() public static method

public static CreateUnwrapped ( Expression expr ) : Expression
expr System.Linq.Expressions.Expression
return System.Linq.Expressions.Expression
Example #1
0
        protected override Expression DoResolve(ResolveContext rc)
        {
            if (rc.IsRuntimeBinder)
            {
                if (UnwrapLeft == null && !Left.Type.IsNullableType)
                {
                    Left = LiftOperand(rc, Left);
                }

                if (UnwrapRight == null && !Right.Type.IsNullableType)
                {
                    Right = LiftOperand(rc, Right);
                }
            }
            else
            {
                if (UnwrapLeft == null && Left != null && Left.Type.IsNullableType)
                {
                    Left       = Unwrap.CreateUnwrapped(Left);
                    UnwrapLeft = Left as Unwrap;
                }

                if (UnwrapRight == null && Right != null && Right.Type.IsNullableType)
                {
                    Right       = Unwrap.CreateUnwrapped(Right);
                    UnwrapRight = Right as Unwrap;
                }
            }

            type   = Binary.Type;
            eclass = Binary.eclass;

            return(this);
        }