static void MainX(string[] args) { ICommandsExecutor executor = CreateExecutor(); //if (args.Length > 0) // executor.Execute(args); //else RunInteractiveMode(executor); }
public static void RunInteractiveMode(ICommandsExecutor executor) { while (true) { var line = Console.ReadLine(); if (line == null || line == "exit") { return; } executor.Execute(line.Split(' ')); } }
public CommandsScheduler(ICommandsExecutor commandsExecutor) { this.commandsExecutor = commandsExecutor; }