static void Main(string[] args)
        {
            IInputReader  reader= new InputReader();
            CommandDispatcher dispacther = new CommandDispatcher();
            IEngine engine = new Engine(dispacther, reader);

            engine.Run();
        }
Пример #2
0
 public Engine(CommandDispatcher commandDispatcher,IInputReader inputReader)
 {
     this.categories = new List<ICategory>();
     this.products = new List<IProduct>();
     this.commandDispatcher = commandDispatcher;
     this.inputReader = inputReader;
     this.runningEngine = false;
     this.products.Add(new Toothpaste("Duck","drin",12,Gender.Unisex,"soda"));
 }