Beispiel #1
0
 internal static RootCommand CreateCommand()
 {
     return(new RootCommand("Manages JSON Web Keys")
     {
         NewCommand.Create(),
         EncryptCommand.Create(),
         DecryptCommand.Create(),
         ConvertCommand.Create(),
         CheckCommand.Create()
     });
 }
Beispiel #2
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));
        }