/// <summary> /// Initializes a new instance of the <see cref="CommandLine.Text.HelpText"/> class /// specifying heading and copyright strings. /// </summary> /// <param name="sentenceBuilder">A <see cref="SentenceBuilder"/> instance.</param> /// <param name="heading">A string with heading or an instance of <see cref="CommandLine.Text.HeadingInfo"/>.</param> /// <param name="copyright">A string with copyright or an instance of <see cref="CommandLine.Text.CopyrightInfo"/>.</param> /// <exception cref="System.ArgumentNullException">Thrown when one or more parameters are null or empty strings.</exception> public HelpText(SentenceBuilder sentenceBuilder, string heading, string copyright) { if (sentenceBuilder == null) { throw new ArgumentNullException("sentenceBuilder"); } if (heading == null) { throw new ArgumentNullException("heading"); } if (copyright == null) { throw new ArgumentNullException("copyright"); } this.preOptionsHelp = new StringBuilder(BuilderCapacity); this.postOptionsHelp = new StringBuilder(BuilderCapacity); this.sentenceBuilder = sentenceBuilder; this.heading = heading; this.copyright = copyright; }
/// <summary> /// Initializes a new instance of the <see cref="CommandLine.Text.HelpText"/> class /// specifying heading and copyright strings. /// </summary> /// <param name="heading">A string with heading or an instance of <see cref="CommandLine.Text.HeadingInfo"/>.</param> /// <param name="copyright">A string with copyright or an instance of <see cref="CommandLine.Text.CopyrightInfo"/>.</param> /// <exception cref="System.ArgumentNullException">Thrown when one or more parameters are null or empty strings.</exception> public HelpText(string heading, string copyright) : this(SentenceBuilder.CreateDefault(), heading, copyright) { }
/// <summary> /// Initializes a new instance of the <see cref="CommandLine.Text.HelpText"/> class /// specifying the sentence builder and heading string. /// </summary> /// <param name="sentenceBuilder">A <see cref="SentenceBuilder"/> instance.</param> /// <param name="heading">A string with heading or an instance of <see cref="CommandLine.Text.HeadingInfo"/>.</param> public HelpText(SentenceBuilder sentenceBuilder, string heading) : this(sentenceBuilder, heading, string.Empty) { }
/// <summary> /// Initializes a new instance of the <see cref="CommandLine.Text.HelpText"/> class /// specifying heading string. /// </summary> /// <param name="heading">An heading string or an instance of <see cref="CommandLine.Text.HeadingInfo"/>.</param> /// <exception cref="System.ArgumentException">Thrown when parameter <paramref name="heading"/> is null or empty string.</exception> public HelpText(string heading) : this(SentenceBuilder.CreateDefault(), heading, string.Empty) { }
/// <summary> /// Initializes a new instance of the <see cref="CommandLine.Text.HelpText"/> class /// specifying the sentence builder. /// </summary> /// <param name="sentenceBuilder"> /// A <see cref="SentenceBuilder"/> instance. /// </param> public HelpText(SentenceBuilder sentenceBuilder) : this(sentenceBuilder, string.Empty, string.Empty) { }
/// <summary> /// Initializes a new instance of the <see cref="CommandLine.Text.HelpText"/> class. /// </summary> public HelpText() : this(SentenceBuilder.CreateDefault(), string.Empty, string.Empty) { }