/// <summary> /// Initializes a new instance of the <see cref="CommandLine.Text.CopyrightInfo"/> class /// specifying symbol case, author and copyrightYears. /// </summary> /// <param name="isSymbolUpper">The case of the copyright symbol.</param> /// <param name="author">The company or person holding the copyright.</param> /// <param name="copyrightYears">The copyrightYears of coverage of copyright.</param> /// <exception cref="System.ArgumentException">Thrown when parameter <paramref name="author"/> is null or empty string.</exception> /// <exception cref="System.ArgumentOutOfRangeException">Thrown when parameter <paramref name="copyrightYears"/> is not supplied.</exception> public CopyrightInfo(bool isSymbolUpper, string author, params int[] copyrightYears) { Assumes.NotNullOrEmpty(author, "author"); Assumes.NotZeroLength(copyrightYears, "copyrightYears"); const int extraLength = 10; _isSymbolUpper = isSymbolUpper; _author = author; _copyrightYears = copyrightYears; _builderSize = 12 + author.Length + (4 * copyrightYears.Length) + extraLength; }
/// <summary> /// Initializes a new instance of the <see cref="CommandLine.Text.CopyrightInfo"/> class /// specifying symbol case, author and years. /// </summary> /// <param name="isSymbolUpper">The case of the copyright symbol.</param> /// <param name="author">The company or person holding the copyright.</param> /// <param name="years">The years of coverage of copyright.</param> /// <exception cref="System.ArgumentException">Thrown when parameter <paramref name="author"/> is null or empty string.</exception> /// <exception cref="System.ArgumentOutOfRangeException">Thrown when parameter <paramref name="years"/> is not supplied.</exception> public CopyrightInfo(bool isSymbolUpper, string author, params int[] years) { Assumes.NotNullOrEmpty(author, "author"); Assumes.NotZeroLength(years, "years"); const int extraLength = 10; _isSymbolUpper = isSymbolUpper; _author = author; _years = years; _builder = new StringBuilder (CopyrightWord.Length + author.Length + (4 * years.Length) + extraLength); }