Ntreev.Library.Commands.CommandLineParser.PrintMethodUsage C# (CSharp) Method

PrintMethodUsage() public method

public PrintMethodUsage ( ) : void
return void
        public virtual void PrintMethodUsage()
        {
            var descriptors = CommandDescriptor.GetMethodDescriptors(this.instance).Where(item => this.IsMethodVisible(item));
            this.MethodUsagePrinter.Print(this.Out, descriptors.ToArray());
        }

Same methods

CommandLineParser::PrintMethodUsage ( string methodName ) : void

Usage Example

 protected virtual void PrintUsage(ICommand command, CommandLineParser parser)
 {
     if (command.Types.HasFlag(CommandTypes.HasSubCommand) == true)
     {
         if (this.SubCommandName != string.Empty)
             parser.PrintMethodUsage(this.SubCommandName);
         else
             parser.PrintMethodUsage();
     }
     else
     {
         parser.PrintUsage();
     }
 }