protected static void PrintUsage(string msg, string command, Options options, string footer) { HelpFormatter formatter = new HelpFormatter() { SyntaxPrefix = "" }; StringWriter wr = new StringWriter(); wr.Write(command + " "); formatter.PrintUsage(wr, Int32.MaxValue, null, options); string usageOptions = wr.ToString().Trim(); wr.Dispose(); string optionsString = formatter.RenderOptions(new StringBuilder(), Int32.MaxValue, options, 0, 2).ToString(); Allcea.PrintUsage(msg, usageOptions, optionsString, footer); }
protected static void PrintUsage(string msg, string command, Options options, string footer) { HelpFormatter formatter = new HelpFormatter() { SyntaxPrefix = "" }; StringWriter wr = new StringWriter(); wr.Write(command + " "); formatter.PrintUsage(wr, Int32.MaxValue, null, options); string usageOptions = wr.ToString().Trim(); wr.Dispose(); string optionsString = formatter.RenderOptions(new StringBuilder(), Int32.MaxValue, options, 0, 2).ToString(); Allcea.PrintUsage(msg, usageOptions, optionsString, footer); }