Пример #1
0
        protected override void SetMyBlockInternalArg()
        {
            switch (op)
            {
            case OPERATION.ADD:
                myBlockInternalArg = new AdditionInstruction(this);
                break;

            case OPERATION.DIV:
                myBlockInternalArg = new DivisionInstruction(this);
                break;

            case OPERATION.MUL:
                myBlockInternalArg = new MultiplicationInstruction(this);
                break;

            case OPERATION.SUB:
                myBlockInternalArg = new SubtractionInstruction(this);
                break;
            }
        }
Пример #2
0
 public void VisitDivision(DivisionInstruction instruction) => IncrementCallCount(nameof(VisitDivision));