ParseError Class
Represents an object that indicates a message, warning or error related to parsing.
public class ParseError : IParseError
- Inheritance:
- System.Object Object
- Implements:
- IParseError
Constructors
ParseError()
Initializes a new instance of the ParseError class.
public ParseError()
ParseError(ParseErrorLevel, String, TextPositionRange)
Initializes a new instance of the ParseError class.
public ParseError(ParseErrorLevel level, string description, TextPositionRange positionRange)
| Parameter | Type | Description |
|---|---|---|
| level | ParseErrorLevel | A ParseErrorLevel indicating the error level. |
| description | System.String | The description of the error, which is displayed in the user interface. |
| positionRange | TextPositionRange | The TextPositionRange of the error. |
Properties
ClassificationType
Gets or sets the optional IClassificationType associated with the error.
public IClassificationType ClassificationType { get; set; }
Property Value
- IClassificationType:
The optional IClassificationType associated with the error.
Description
Gets or sets the description of the error, which is displayed in the user interface.
public string Description { get; set; }
Property Value
- System.String:
The description of the error, which is displayed in the user interface.
Level
Gets or sets a ParseErrorLevel indicating the error level.
public ParseErrorLevel Level { get; set; }
Property Value
- ParseErrorLevel:
A ParseErrorLevel indicating the error level.
PositionRange
Gets or sets the TextPositionRange of the error.
public TextPositionRange PositionRange { get; set; }
Property Value
- TextPositionRange:
The TextPositionRange of the error.
Remarks
If no text position data is available for the error, the value should be TextPositionRange.Empty.
Methods
Equals(Object)
Determines whether the specified System.Object is equal to the current System.Object.
public override bool Equals(object obj)
| Parameter | Type | Description |
|---|---|---|
| obj | System.Object | The System.Object to compare with the current System.Object. |
Returns
- System.Boolean:
true if the specified System.Object is equal to the current System.Object; otherwise, false.
Exceptions
| Type | Condition |
|---|---|
| System.NullReferenceException | The |
GetHashCode()
Serves as a hash function for a particular type.
public override int GetHashCode()
Returns
- System.Int32:
A hash code for the current System.Object.
ToString()
Returns a String that represents the current Object.
public override string ToString()
Returns
- System.String:
A
Stringthat represents the currentObject.
Inherited Members
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetType()
- System.Object.MemberwiseClone()