Пример #1
0
 public OptionHelpFormatter(TextWriter writer, WriteHelpSettings settings)
 {
     if (writer == null)
     {
         throw new ArgumentNullException(nameof(writer));
     }
     if (settings == null)
     {
         throw new ArgumentNullException(nameof(settings));
     }
     this.writer = writer;
     Settings    = settings;
 }
Пример #2
0
        public static void WriteHelp(this OptTable table, TextWriter writer, WriteHelpSettings settings)
        {
            if (writer == null)
            {
                throw new ArgumentNullException(nameof(writer));
            }
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            var formatter = new OptionHelpFormatter(writer, settings);

            table.WriteHelp(formatter);
        }