示例#1
0
 public ArithmeticExpression(ArithmeticExpression _LeftOperandExpression, ArithmeticOperator _Operator,
                             ArithmeticTerm _RightOperandTerm)
 {
     if (_Operator != ArithmeticOperator.PLUS && _Operator != ArithmeticOperator.MINUS)
     {
         throw new InvalidOperationException();
     }
     LeftOperandExpression = _LeftOperandExpression;
     Operator         = _Operator;
     RightOperandTerm = _RightOperandTerm;
 }
示例#2
0
 public ArithmeticTerm(ArithmeticTerm _LeftOperandTerm, ArithmeticOperator _Operator,
                       IExpression <Value> _RightOperandFactor)
 {
     if (_Operator != ArithmeticOperator.MULTIPLY && _Operator != ArithmeticOperator.DIVIDE)
     {
         throw new InvalidOperationException();
     }
     LeftOperandTerm    = _LeftOperandTerm;
     Operator           = _Operator;
     RightOperandFactor = _RightOperandFactor;
 }
示例#3
0
 public ArithmeticExpression(ArithmeticTerm _RightOperandTerm)
 {
     RightOperandTerm = _RightOperandTerm;
 }