static void Main(string[] args) { var context = new CLIContext(Environment.CurrentDirectory); var commandContainer = new CLICommandsContainer { { new CLICommandConfig("my command"), new MyCommand() }, { new CLICommandConfig("with initialize"), new MyCommandWithInitialize() } }; using (var driver = new Driver(commandContainer, context)) { driver.Run(); } }
static void Main(string[] args) { CLIConsole.WriteLine("Welcome to ClArc"); CLIConsole.WriteLine(); var commands = new CLICommandsContainer { { new CLICommandConfig("GenerateDefaultWebProject"), new CreateDefaultWebProjectCommand() }, { new CLICommandConfig("UseCase"), new CreateUseCaseCommand() }, }; var context = new CLIContext(Environment.CurrentDirectory); using (var driver = new Driver(commands, context)) { driver.Run(); } }
public Driver(CLICommandsContainer commandContainer, CLIContext context = null) { this.commandContainer = commandContainer; this.context = context; }