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