Class DiagnosticItem
Denotes an error while parsing
public class DiagnosticItem : IDisposable
- Inheritance
-
DiagnosticItem
- Implements
- Inherited Members
Constructors
DiagnosticItem(string, RuleApplication, string, DiagnosticSeverity)
Creates a new instance
public DiagnosticItem(string source, RuleApplication ruleApplication, string message, DiagnosticSeverity severity = DiagnosticSeverity.Error)
Parameters
source
stringthe source of the error
ruleApplication
RuleApplicationthe rule application that points to the error
message
stringthe error message
severity
DiagnosticSeveritythe severity of the diagnostics item
Properties
Length
Gets the length of the error
public ParsePositionDelta Length { get; }
Property Value
Message
Gets the error message
public string Message { get; protected set; }
Property Value
Position
Gets the position of the error
public ParsePosition Position { get; }
Property Value
RuleApplication
Gets the rule application that indicates the error position
public RuleApplication RuleApplication { get; }
Property Value
Severity
Gets the severity of the diagnostic item
public DiagnosticSeverity Severity { get; }
Property Value
Source
Gets the source of the error
public string Source { get; }
Property Value
Methods
CheckIfStillExist(ParseContext)
Checks if the error still exists
public virtual bool CheckIfStillExist(ParseContext context)
Parameters
context
ParseContextthe parsing context
Returns
- bool
true, if the error still exists, otherwise false
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public virtual void Dispose()
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.