![]() |
BadScript 2
|
Models the copyright part of an help text. You can assign it where you assign any System.String instance. More...
Public Member Functions | |
CopyrightInfo (string author, int year) | |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class specifying author and year. | |
CopyrightInfo (string author, params int[] years) | |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class specifying author and copyrightYears. | |
CopyrightInfo (bool isSymbolUpper, string author, params int[] copyrightYears) | |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class specifying symbol case, author and copyrightYears. | |
override string | ToString () |
Returns the copyright as a System.String. | |
Static Public Member Functions | |
static implicit | operator string (CopyrightInfo info) |
Converts the copyright instance to a System.String. | |
Protected Member Functions | |
CopyrightInfo () | |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class. | |
virtual string | FormatYears (int[] years) |
When overridden in a derived class, allows to specify a new algorithm to render copyright copyrightYears as a System.String instance. | |
Properties | |
static CopyrightInfo | Empty [get] |
An empty object used for initialization. | |
static CopyrightInfo | Default [get] |
Gets the default copyright information. Retrieved from AssemblyCopyrightAttribute, if it exists, otherwise it uses AssemblyCompanyAttribute as copyright holder with the current year. If neither exists it throws an InvalidOperationException. | |
virtual string | CopyrightWord [get] |
Gets a different copyright word when overridden in a derived class. | |
Private Member Functions | |
CopyrightInfo (AssemblyCopyrightAttribute attribute) | |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class with an assembly attribute, this overrides all formatting. | |
Private Attributes | |
readonly AssemblyCopyrightAttribute | attribute |
readonly string | author |
readonly int | builderSize |
readonly int[] | copyrightYears |
readonly bool | isSymbolUpper |
Static Private Attributes | |
const string | DefaultCopyrightWord = "Copyright" |
const string | SymbolLower = "(c)" |
const string | SymbolUpper = "(C)" |
Models the copyright part of an help text. You can assign it where you assign any System.String instance.
Definition at line 18 of file CopyrightInfo.cs.
CommandLine.Text.CopyrightInfo.CopyrightInfo | ( | string | author, |
int | year | ||
) |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class specifying author and year.
author | The company or person holding the copyright. |
year | The year of coverage of copyright. |
System.ArgumentException | Thrown when parameter author is null or empty string. |
Definition at line 36 of file CopyrightInfo.cs.
CommandLine.Text.CopyrightInfo.CopyrightInfo | ( | string | author, |
params int[] | years | ||
) |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class specifying author and copyrightYears.
author | The company or person holding the copyright. |
years | The copyrightYears of coverage of copyright. |
System.ArgumentException | Thrown when parameter author is null or empty string. |
System.ArgumentOutOfRangeException | Thrown when parameter years is not supplied. |
Definition at line 47 of file CopyrightInfo.cs.
CommandLine.Text.CopyrightInfo.CopyrightInfo | ( | bool | isSymbolUpper, |
string | author, | ||
params int[] | copyrightYears | ||
) |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class specifying symbol case, author and copyrightYears.
isSymbolUpper | The case of the copyright symbol. |
author | The company or person holding the copyright. |
copyrightYears | The copyrightYears of coverage of copyright. |
System.ArgumentException | Thrown when parameter author is null or empty string. |
System.ArgumentOutOfRangeException | Thrown when parameter copyrightYears is not supplied. |
Definition at line 62 of file CopyrightInfo.cs.
|
protected |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class.
Definition at line 84 of file CopyrightInfo.cs.
|
private |
Initializes a new instance of the CommandLine.Text.CopyrightInfo class with an assembly attribute, this overrides all formatting.
attribute | The attribute which text to use. |
Definition at line 91 of file CopyrightInfo.cs.
|
protectedvirtual |
When overridden in a derived class, allows to specify a new algorithm to render copyright copyrightYears as a System.String instance.
years | A System.Int32 array of copyrightYears. |
Definition at line 178 of file CopyrightInfo.cs.
|
static |
Converts the copyright instance to a System.String.
info | This CommandLine.Text.CopyrightInfo instance. |
Definition at line 145 of file CopyrightInfo.cs.
override string CommandLine.Text.CopyrightInfo.ToString | ( | ) |
Returns the copyright as a System.String.
Definition at line 154 of file CopyrightInfo.cs.
|
private |
Definition at line 23 of file CopyrightInfo.cs.
|
private |
Definition at line 24 of file CopyrightInfo.cs.
|
private |
Definition at line 25 of file CopyrightInfo.cs.
|
private |
Definition at line 26 of file CopyrightInfo.cs.
|
staticprivate |
Definition at line 20 of file CopyrightInfo.cs.
|
private |
Definition at line 27 of file CopyrightInfo.cs.
|
staticprivate |
Definition at line 21 of file CopyrightInfo.cs.
|
staticprivate |
Definition at line 22 of file CopyrightInfo.cs.
|
getprotected |
Gets a different copyright word when overridden in a derived class.
Definition at line 138 of file CopyrightInfo.cs.
|
staticget |
Gets the default copyright information. Retrieved from AssemblyCopyrightAttribute, if it exists, otherwise it uses AssemblyCompanyAttribute as copyright holder with the current year. If neither exists it throws an InvalidOperationException.
Definition at line 107 of file CopyrightInfo.cs.
|
staticget |
An empty object used for initialization.
Definition at line 99 of file CopyrightInfo.cs.