Exemplo n.º 1
0
        internal static Command Create()
        {
            var command = new CheckCommand()
                          .RequiredInputPath()
                          .Verbose();

            return(command);
        }
Exemplo n.º 2
0
 internal static RootCommand CreateCommand()
 {
     return(new RootCommand("Manages JSON Web Keys")
     {
         NewCommand.Create(),
         EncryptCommand.Create(),
         DecryptCommand.Create(),
         ConvertCommand.Create(),
         CheckCommand.Create()
     });
 }
Exemplo n.º 3
0
        private static async Task <int> Main(string[] args)
        {
            var rootCommand = new RootCommand("Manages JSON Web Keys")
            {
                NewCommand.Create(),
                EncryptCommand.Create(),
                DecryptCommand.Create(),
                ConvertCommand.Create(),
                CheckCommand.Create()
            };
            Parser parser = BuildParser(rootCommand);

            // Parse the incoming args so we can give warnings when deprecated options are used.
            _parseResult = parser.Parse(args);
            ConsoleExtensions.IsVerbose = _parseResult.HasOption("--verbose");

            return(await parser.InvokeAsync(args));
        }