internal InvalidCommandLineSwitchException(ErrorTypes errorType, string optionName, string parameter, Type expectedParameterType, Exception innerException) : base("", innerException) { this.ParserError = new CommandLineSwitchParserError(errorType, optionName, parameter, expectedParameterType); }
public static bool TryParse <TOptions>(ref string[] args, out TOptions options, out CommandLineSwitchParserError err) where TOptions : new() { err = null; options = default(TOptions); try { options = Parse <TOptions>(ref args); return(true); } catch (InvalidCommandLineSwitchException e) { err = e.ParserError; return(false); } }