예제 #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();
        }
예제 #2
0
 public TimeLog(CommandProcessor commandProcessor)
 {
     userControl = new UserControl(commandProcessor, new CommandlineParser());
 }
예제 #3
0
 public UserControl(CommandProcessor commandProcessor, CommandlineParser commandlineParser)
 {
     this.commandProcessor = commandProcessor;
     this.commandlineParser = commandlineParser;
 }