In This Article

ParseError Class

Represents an object that indicates a message, warning or error related to parsing.

public class ParseError : IParseError
Inheritance:
object object
Implements:
IParseError

Constructors

ParseError(ParseErrorLevel, string?, TextPositionRange?)

Initializes an instance of the class.

public ParseError(ParseErrorLevel level = ParseErrorLevel.Error, string? description = null, TextPositionRange? positionRange = null)
Parameter Type Description
level ParseErrorLevel

A ParseErrorLevel indicating the error level, defaulting to Error.

description string

The description of the error, which is displayed in the user interface.

positionRange TextPositionRange?

The TextPositionRange of the error, if known.

Properties

ClassificationType

The optional IClassificationType associated with the error.

public IClassificationType? ClassificationType { get; set; }

Property Value

IClassificationType

Description

The description of the error, which is displayed in the user interface.

public string? Description { get; set; }

Property Value

string

Level

A ParseErrorLevel indicating the error level.

public ParseErrorLevel Level { get; set; }

Property Value

ParseErrorLevel

PositionRange

The TextPositionRange of the error, if known.

public TextPositionRange? PositionRange { get; set; }

Property Value

TextPositionRange?

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameter Type Description
obj object

The object to compare with the current object.

Returns

bool:

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int:

A hash code for the current object.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Inherited Members

Extension Methods