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

Base type of all erros with name information. More...

Inheritance diagram for CommandLine.NamedError:
CommandLine.Error CommandLine.BadFormatConversionError CommandLine.GroupOptionAmbiguityError CommandLine.MissingRequiredOptionError CommandLine.MissingValueOptionError CommandLine.MutuallyExclusiveSetError CommandLine.RepeatedOptionError CommandLine.SequenceOutOfRangeError CommandLine.SetValueExceptionError

Public Member Functions

bool Equals (NamedError other)
 Returns a value that indicates whether the current instance and a specified CommandLine.NamedError 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.
 
- Public Member Functions inherited from CommandLine.Error
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

 NamedError (ErrorType tag, NameInfo nameInfo)
 Initializes a new instance of the CommandLine.NamedError class.
 
- Package Functions inherited from CommandLine.Error
 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

NameInfo NameInfo [get]
 Name information relative to this error instance.
 
- Properties inherited from CommandLine.Error
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 erros with name information.

Definition at line 294 of file Error.cs.

Constructor & Destructor Documentation

◆ NamedError()

CommandLine.NamedError.NamedError ( ErrorType  tag,
NameInfo  nameInfo 
)
package

Initializes a new instance of the CommandLine.NamedError class.

Parameters
tagError type.
nameInfoProblematic name.

Definition at line 301 of file Error.cs.

302 : base(tag)
303 {
304 NameInfo = nameInfo;
305 }
NameInfo NameInfo
Name information relative to this error instance.
Definition Error.cs:310

Member Function Documentation

◆ Equals() [1/2]

bool CommandLine.NamedError.Equals ( NamedError  other)

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

Parameters
otherThe CommandLine.NamedError instance to compare.
Returns
true

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

false

Definition at line 326 of file Error.cs.

327 {
328 if (other == null)
329 {
330 return false;
331 }
332
333 return Tag.Equals(other.Tag) && NameInfo.Equals(other.NameInfo);
334 }
ErrorType Tag
Error type discriminator, defined as CommandLine.ErrorType enumeration.
Definition Error.cs:132
bool Equals(NameInfo other)
Returns a value that indicates whether the current instance and a specified CommandLine....
Definition NameInfo.cs:64

◆ Equals() [2/2]

override bool CommandLine.NamedError.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 348 of file Error.cs.

349 {
350 NamedError other = obj as NamedError;
351
352 if (other != null)
353 {
354 return Equals(other);
355 }
356
357 return base.Equals(obj);
358 }
NamedError(ErrorType tag, NameInfo nameInfo)
Initializes a new instance of the CommandLine.NamedError class.
Definition Error.cs:301
bool Equals(NamedError other)
Returns a value that indicates whether the current instance and a specified CommandLine....
Definition Error.cs:326

◆ GetHashCode()

override int CommandLine.NamedError.GetHashCode ( )

Serves as a hash function for a particular type.

A hash code for the current System.Object.

Definition at line 364 of file Error.cs.

365 {
366 return new { Tag, StopsProcessing, NameInfo }.GetHashCode();
367 }
bool StopsProcessing
Tells if error stops parsing process. Filtered by CommandLine.ErrorExtensions.OnlyMeaningfulOnes(Syst...
Definition Error.cs:139
override int GetHashCode()
Serves as a hash function for a particular type.
Definition NameInfo.cs:102

Property Documentation

◆ NameInfo

NameInfo CommandLine.NamedError.NameInfo
get

Name information relative to this error instance.

Definition at line 310 of file Error.cs.

310{ get; }

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