Пример #1
0
        public CommandRouter MakeRouter()
        {
            CommandRouter commandRouter = new CommandRouter();

            commandRouter.AddCommand("database", "create", new Command(DatabaseActions.CreateDatabaseAsync));
            commandRouter.AddCommand("database", "view", new Command(_ => DatabaseActions.ViewDatabasesAsync()));
            commandRouter.AddCommand("database", "delete", new Command(DatabaseActions.DeleteDatabaseAsync));

            commandRouter.AddCommand("container", "create", new Command(ContainerActions.CreateContainerAsync));
            commandRouter.AddCommand("container", "view", new Command(ContainerActions.ViewContainersAsync));
            commandRouter.AddCommand("container", "delete", new Command(ContainerActions.DeleteContainerAsync));
            return(commandRouter);
        }