public void Build(BogApiClientApplication clientApplication)
        {
            if (clientApplication == null)
            {
                throw new ArgumentNullException(nameof(clientApplication));
            }

            clientApplication.Command(CommandTypeNameValues.RESTORE_COMMAND, (app) =>
            {
                app.HelpOption(CommandApplicationConfigurationValues.HELP_TEMPLATE);
                app.Description = "Restore articles within the current directory";

                app.OnExecute(() =>
                {
                    app.ShowHint();
                    return(0);
                });
            });
        }
Exemplo n.º 2
0
        public void Build(BogApiClientApplication clientApplication)
        {
            if (clientApplication == null)
            {
                throw new ArgumentNullException(nameof(clientApplication));
            }

            clientApplication.Command(CommandTypeNameValues.UPDATE_COMMAND, (app) =>
            {
                app.HelpOption(CommandApplicationConfigurationValues.HELP_TEMPLATE);
                app.Description = "Update instances of bog entities stored in the current context";

                app.OnExecute(() =>
                {
                    app.ShowHint();
                    return(0);
                });
            });
        }
Exemplo n.º 3
0
        public void Build(BogApiClientApplication clientApplication)
        {
            if (clientApplication == null)
            {
                throw new ArgumentNullException(nameof(clientApplication));
            }

            clientApplication.Command(CommandTypeNameValues.PING_COMMAND, (app) =>
            {
                app.HelpOption(CommandApplicationConfigurationValues.HELP_TEMPLATE);
                app.Description = "Ping test for API health-check";

                app.OnExecute(async() =>
                {
                    await _pingCommand.SendHealthCheckPing();
                    return(0);
                });
            });
        }