Exemplo n.º 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;
            }
        }
Exemplo n.º 2
0
 public void VisitSubtraction(SubtractionInstruction instruction) => IncrementCallCount(nameof(VisitSubtraction));