예제 #1
0
파일: BinaryOperator.cs 프로젝트: juoni/D20
 protected BinaryOperator(Rollable left, Rollable right)
 {
     if (left == null)
     {
         throw new ArgumentNullException(nameof(left));
     }
     if (right == null)
     {
         throw new ArgumentNullException(nameof(right));
     }
     this.Left  = left;
     this.Right = right;
 }
예제 #2
0
파일: BinaryOperator.cs 프로젝트: juoni/D20
 private bool needsParenthesis(Rollable child)
 => (child as BinaryOperator)?.OperatorPrecedence < this.OperatorPrecedence;
예제 #3
0
파일: BinaryOperator.cs 프로젝트: juoni/D20
 public abstract Rollable With(Rollable left, Rollable right);
예제 #4
0
파일: Rollable.cs 프로젝트: juoni/D20
 public Rollable Times(Rollable right) => this * right;
예제 #5
0
파일: Rollable.cs 프로젝트: juoni/D20
 public Rollable Minus(Rollable right) => this - right;
예제 #6
0
파일: Rollable.cs 프로젝트: juoni/D20
 public Rollable Plus(Rollable right) => this + right;