System.Linq.Expressions.Expression.OrAssign C# (CSharp) 메소드

OrAssign() 공개 정적인 메소드

Creates a BinaryExpression that represents a bitwise OR assignment operation.
public static OrAssign ( Expression left, Expression right, MethodInfo method ) : BinaryExpression
left Expression An to set the property equal to.
right Expression An to set the property equal to.
method MethodInfo A to set the property equal to.
리턴 BinaryExpression
        public static BinaryExpression OrAssign(Expression left, Expression right, MethodInfo method)
        {
            return OrAssign(left, right, method, conversion: null);
        }

Same methods

Expression::OrAssign ( Expression left, Expression right ) : BinaryExpression
Expression::OrAssign ( Expression left, Expression right, MethodInfo method, LambdaExpression conversion ) : BinaryExpression

Usage Example

예제 #1
0
        protected override object VisitAssignment(Assignment A)
        {
            LinqExpr value = target.Compile(A.Value);

            switch (A.Operator)
            {
            case Operator.Add: target.Add(LinqExpr.AddAssign(target.LookUp(A.Assign), value)); break;

            case Operator.Subtract: target.Add(LinqExpr.SubtractAssign(target.LookUp(A.Assign), value)); break;

            case Operator.Multiply: target.Add(LinqExpr.MultiplyAssign(target.LookUp(A.Assign), value)); break;

            case Operator.Divide: target.Add(LinqExpr.DivideAssign(target.LookUp(A.Assign), value)); break;

            case Operator.Power: target.Add(LinqExpr.PowerAssign(target.LookUp(A.Assign), value)); break;

            case Operator.And: target.Add(LinqExpr.AndAssign(target.LookUp(A.Assign), value)); break;

            case Operator.Or: target.Add(LinqExpr.OrAssign(target.LookUp(A.Assign), value)); break;

            case Operator.Equal:
                LinqExpr x = target.LookUp(A.Assign);
                if (x == null)
                {
                    x = target.DeclInit(A.Assign, A.Value);
                }
                target.Add(LinqExpr.Assign(x, value));
                break;

            default: throw new NotImplementedException("Operator not implemented for assignment.");
            }
            return(null);
        }
All Usage Examples Of System.Linq.Expressions.Expression::OrAssign
Expression