Пример #1
0
        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();
            }
        }
Пример #2
0
        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();
            }
        }
Пример #3
0
 public Driver(CLICommandsContainer commandContainer, CLIContext context = null)
 {
     this.commandContainer = commandContainer;
     this.context          = context;
 }