AjScript.Expressions.ArithmeticUnaryExpression.ArithmeticUnaryExpression C# (CSharp) Метод

ArithmeticUnaryExpression() публичный Метод

public ArithmeticUnaryExpression ( ArithmeticOperator operation, IExpression expression ) : System
operation ArithmeticOperator
expression IExpression
Результат System
        public ArithmeticUnaryExpression(ArithmeticOperator operation, IExpression expression)
            : base(expression)
        {
            this.operation = operation;

            switch (operation)
            {
                case ArithmeticOperator.Minus:
                    this.function = Operators.NegateObject;
                    break;
                case ArithmeticOperator.Plus:
                    this.function = Operators.PlusObject;
                    break;
                default:
                    throw new ArgumentException("Invalid operator");
            }
        }
ArithmeticUnaryExpression