Currently, a Visitor class builds an IOrgCommand object, which is passed back to the executor which then does a switch on the CommandType and processes it differently.
Change this, such that the IOrgCommand instance has different derivations, and then simplify the executor such that it just passes control to the derived IOrgCommand instance to have it executed.
Currently, a Visitor class builds an IOrgCommand object, which is passed back to the executor which then does a switch on the CommandType and processes it differently.
Change this, such that the IOrgCommand instance has different derivations, and then simplify the executor such that it just passes control to the derived IOrgCommand instance to have it executed.