/// <summary> /// For unit tests, replaces Environment.Exit with action for testing purposes. /// </summary> /// <param name="name"></param> /// <param name="errorHandling"></param> /// <param name="environmentExit"></param> /// <returns></returns> internal static FlagSet NewFlagSet(string name, ErrorHandling errorHandling, Action <int> environmentExit) { _commandLine = new FlagSet(name, errorHandling, environmentExit); return(_commandLine); }
/// <summary> /// NewFlagSet returns a new, empty flag set with the specified name and /// error handling property. If the name is not empty, it will be printed /// in the default usage message and in error messages. /// </summary> /// <param name="name"></param> /// <param name="errorHandling"></param> /// <returns></returns> public static FlagSet NewFlagSet(string name, ErrorHandling errorHandling) { _commandLine = new FlagSet(name, errorHandling); return(_commandLine); }