public CommandLineException(CommandArgumentHelp argumentHelp, Exception inner) : base(CheckNotNull(argumentHelp).Message, inner) { ArgumentHelp = argumentHelp; SubscribeToSerializeObjectState(); }
private static CommandArgumentHelp CheckNotNull(CommandArgumentHelp argumentHelp) { if (argumentHelp == null) { throw new ArgumentNullException("argumentHelp"); } return argumentHelp; }
private static CommandArgumentHelp CheckNotNull(CommandArgumentHelp argumentHelp) { if (argumentHelp == null) { throw new ArgumentNullException("argumentHelp"); } return(argumentHelp); }
public CommandLineHelpException(CommandArgumentHelp argumentHelp, Exception inner) : base(argumentHelp, inner) { ArgumentHelp = argumentHelp; }
public CommandLineHelpException(CommandArgumentHelp argumentHelp) : base(argumentHelp.Message) { ArgumentHelp = argumentHelp; }
public CommandLineHelpException(CommandArgumentHelp argumentHelp, Exception inner) : base(argumentHelp, inner) { this.ArgumentHelp = argumentHelp; }
public CommandLineHelpException(CommandArgumentHelp argumentHelp) : base(argumentHelp.Message) { this.ArgumentHelp = argumentHelp; }
public CommandLineException(CommandArgumentHelp argumentHelp, Exception inner) : base(argumentHelp.Message, inner) { ArgumentHelp = argumentHelp; }
static void Main(string[] args) { try { var arguments = CommandLine.Parse<ConnectArgs>(); if (arguments.fix || arguments.show) { Elevate(arguments); } else if (arguments.show) { } else { var help = new CommandArgumentHelp(typeof(ConnectArgs)); Console.WriteLine(help.Message); Console.WriteLine(help.GetHelpText(Console.BufferWidth)); } } catch (CommandLineException exception) { Console.WriteLine(exception.ArgumentHelp.Message); Console.WriteLine(exception.ArgumentHelp.GetHelpText(Console.BufferWidth)); } }
private static void ShowHelp(CommandLineException exception = null) { if (exception != null) { Console.WriteLine(exception.ArgumentHelp.Message); Console.WriteLine(exception.ArgumentHelp.GetHelpText(Console.BufferWidth)); } else { var help = new CommandArgumentHelp(typeof (RecycleCommands)); Console.WriteLine(help.GetHelpText(Console.BufferWidth)); } }