public static void Configure(CommandLineApplication app)
 {
     app.Command("imagestore", application =>
     {
         UploadCommand.Configure(application);
     });
 }
Beispiel #2
0
        public static void Configure(CommandLineApplication app)
        {
            app.Command("upload", application =>
            {
                _appOptions           = new AppOptionsRaw(application);
                _uploadCommandOptions = new UploadCommandOptionsRaw(application);

                application.OnExecute(async() =>
                {
                    var appConfig     = AppOptions.ValidateAndCreate(_appOptions);
                    var commandConfig = UploadCommandOptions.VerifyAndCreateArgs(_uploadCommandOptions);
                    var command       = new UploadCommand();
                    var exitCode      = await command.RunAsync(appConfig, commandConfig).ConfigureAwait(false);
                    return(exitCode);
                });
            });
        }