Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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);
 }