Beispiel #1
0
        public void Usage <T>(TextWriter writer)
        {
            if (writer == null)
            {
                throw new ArgumentNullException(nameof(writer));
            }

            var helperWriter = new UsageWriter(writer);

            helperWriter.Write(typeof(T), this.Configuration);
        }
Beispiel #2
0
        internal bool ParseNoVerb(object options, LinkedList <string> args)
        {
            try
            {
                this.ParseNoVerbInternal(options, args);
                return(true);
            }
            catch (ParserException)
            {
                if (this.Configuration.ErrorOutput != null)
                {
                    var hlp = new UsageWriter(this.Configuration.ErrorOutput);
                    hlp.Write(options, this.Configuration);

                    return(false);
                }

                throw;
            }
        }