コード例 #1
0
 public static void Configure(CommandLineApplication app)
 {
     app.Command("applicationtype", application =>
     {
         ProvisionCommand.Configure(application);
     });
 }
コード例 #2
0
        public static void Configure(CommandLineApplication app)
        {
            app.Command("provision", application =>
            {
                _appOptions = new AppOptionsRaw(application);
                _provisionCommandOptions = new ProvisionCommandOptionsRaw(application);

                application.OnExecute(async() =>
                {
                    var appConfig     = AppOptions.ValidateAndCreate(_appOptions);
                    var commandConfig = ProvisionCommandOptions.VerifyAndCreateArgs(_provisionCommandOptions);
                    var command       = new ProvisionCommand();
                    return(await command.RunAsync(appConfig, commandConfig).ConfigureAwait(false));
                });
            });
        }