Esempio n. 1
0
        static void Main(string[] args)
        {
            var commandProcessor = new CommandProcessor();
            
            var taskRepository = new InMemoryTaskRepository();

            commandProcessor.RegisterCommandHandler(new HelpCommandHandler(Console.Out));
            commandProcessor.RegisterCommandHandler(new QuitCommandHandler());
            commandProcessor.RegisterCommandHandler(new ViewCommandHandler(taskRepository, Console.Out));
            commandProcessor.RegisterCommandHandler(new AddCommandHandler(taskRepository));
  
            var timeLog = new TimeLog(commandProcessor);
            timeLog.Run();
        }
Esempio n. 2
0
 public TimeLog(CommandProcessor commandProcessor)
 {
     userControl = new UserControl(commandProcessor, new CommandlineParser());
 }
Esempio n. 3
0
 public UserControl(CommandProcessor commandProcessor, CommandlineParser commandlineParser)
 {
     this.commandProcessor = commandProcessor;
     this.commandlineParser = commandlineParser;
 }