BadScript 2
Loading...
Searching...
No Matches
CommandLine.Error Class Referenceabstract

Base type of all errors. More...

Inheritance diagram for CommandLine.Error:
CommandLine.HelpRequestedError CommandLine.HelpVerbRequestedError CommandLine.InvalidAttributeConfigurationError CommandLine.MissingGroupOptionError CommandLine.MultipleDefaultVerbsError CommandLine.NamedError CommandLine.NoVerbSelectedError CommandLine.TokenError CommandLine.VersionRequestedError

Public Member Functions

bool Equals (Error other)
 Returns a value that indicates whether the current instance and a specified CommandLine.Error have the same value.
 
override bool Equals (object obj)
 Determines whether the specified System.Object is equal to the current System.Object.
 
override int GetHashCode ()
 Serves as a hash function for a particular type.
 

Package Functions

 Error (ErrorType tag, bool stopsProcessing)
 Initializes a new instance of the CommandLine.Error class.
 
 Error (ErrorType tag)
 Initializes a new instance of the CommandLine.Error class.
 

Properties

ErrorType Tag [get]
 Error type discriminator, defined as CommandLine.ErrorType enumeration.
 
bool StopsProcessing [get]
 Tells if error stops parsing process. Filtered by CommandLine.ErrorExtensions.OnlyMeaningfulOnes(System.Collections.Generic.IEnumerable<Error>).
 

Detailed Description

Base type of all errors.

All errors are defined within the system. There's no reason to create custom derivate types.

Definition at line 109 of file Error.cs.

Constructor & Destructor Documentation

◆ Error() [1/2]

CommandLine.Error.Error ( ErrorType  tag,
bool  stopsProcessing 
)
package

Initializes a new instance of the CommandLine.Error class.

Parameters
tagType discriminator tag.
stopsProcessingTells if error stops parsing process.

Definition at line 116 of file Error.cs.

117 {
118 Tag = tag;
119 StopsProcessing = stopsProcessing;
120 }
ErrorType Tag
Error type discriminator, defined as CommandLine.ErrorType enumeration.
Definition Error.cs:132
bool StopsProcessing
Tells if error stops parsing process. Filtered by CommandLine.ErrorExtensions.OnlyMeaningfulOnes(Syst...
Definition Error.cs:139

◆ Error() [2/2]

CommandLine.Error.Error ( ErrorType  tag)
package

Initializes a new instance of the CommandLine.Error class.

Parameters
tagType discriminator tag.

Definition at line 126 of file Error.cs.

127 : this(tag, false) { }

Member Function Documentation

◆ Equals() [1/2]

bool CommandLine.Error.Equals ( Error  other)

Returns a value that indicates whether the current instance and a specified CommandLine.Error have the same value.

Parameters
otherThe CommandLine.Error instance to compare.
Returns
true

if this instance of CommandLine.Error and other have the same value; otherwise,

false

Definition at line 154 of file Error.cs.

155 {
156 if (other == null)
157 {
158 return false;
159 }
160
161 return Tag.Equals(other.Tag);
162 }

◆ Equals() [2/2]

override bool CommandLine.Error.Equals ( object  obj)

Determines whether the specified System.Object is equal to the current System.Object.

Parameters
objThe System.Object to compare with the current System.Object.
Returns
true

if the specified System.Object is equal to the current System.Object; otherwise,

false

Definition at line 176 of file Error.cs.

177 {
178 Error other = obj as Error;
179
180 if (other != null)
181 {
182 return Equals(other);
183 }
184
185 return base.Equals(obj);
186 }
Error(ErrorType tag, bool stopsProcessing)
Initializes a new instance of the CommandLine.Error class.
Definition Error.cs:116
bool Equals(Error other)
Returns a value that indicates whether the current instance and a specified CommandLine....
Definition Error.cs:154

◆ GetHashCode()

override int CommandLine.Error.GetHashCode ( )

Serves as a hash function for a particular type.

A hash code for the current System.Object.

Definition at line 192 of file Error.cs.

193 {
194 return new { Tag, StopsProcessing }.GetHashCode();
195 }

Property Documentation

◆ StopsProcessing

bool CommandLine.Error.StopsProcessing
get

Tells if error stops parsing process. Filtered by CommandLine.ErrorExtensions.OnlyMeaningfulOnes(System.Collections.Generic.IEnumerable<Error>).

Definition at line 139 of file Error.cs.

139{ get; }

◆ Tag

ErrorType CommandLine.Error.Tag
get

Error type discriminator, defined as CommandLine.ErrorType enumeration.

Definition at line 132 of file Error.cs.

132{ get; }

The documentation for this class was generated from the following file: