Table of Contents

Class DiagnosticItem

Namespace
NMF.AnyText
Assembly
NMF.AnyText.Core.dll

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 string

the source of the error

ruleApplication RuleApplication

the rule application that points to the error

message string

the error message

severity DiagnosticSeverity

the severity of the diagnostics item

Properties

Length

Gets the length of the error

public ParsePositionDelta Length { get; }

Property Value

ParsePositionDelta

Message

Gets the error message

public string Message { get; protected set; }

Property Value

string

Position

Gets the position of the error

public ParsePosition Position { get; }

Property Value

ParsePosition

RuleApplication

Gets the rule application that indicates the error position

public RuleApplication RuleApplication { get; }

Property Value

RuleApplication

Severity

Gets the severity of the diagnostic item

public DiagnosticSeverity Severity { get; }

Property Value

DiagnosticSeverity

Source

Gets the source of the error

public string Source { get; }

Property Value

string

Methods

CheckIfStillExist(ParseContext)

Checks if the error still exists

public virtual bool CheckIfStillExist(ParseContext context)

Parameters

context ParseContext

the 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.