Class ParserDiagnostic
- Namespace
- Farkle.Diagnostics
- Assembly
- Farkle.dll
Represents a diagnostic message from the parser.
public sealed class ParserDiagnostic : ISpanFormattable, IFormattable
- Inheritance
-
ParserDiagnostic
- Implements
Constructors
ParserDiagnostic(TextPosition, object)
Creates a ParserDiagnostic.
public ParserDiagnostic(TextPosition position, object message)
Parameters
positionTextPositionThe value of Position.
messageobjectThe value of Message.
Exceptions
- ArgumentNullException
messageis null.
Properties
Message
An object that describes the message.
public object Message { get; }
Property Value
Position
The position the message was reported at.
public TextPosition Position { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
ToString(string?, IFormatProvider?)
Formats the value of the current instance using the specified format.
public string ToString(string? format, IFormatProvider? formatProvider)
Parameters
formatstringThe format to use.
-or-
A null reference (
Nothingin Visual Basic) to use the default format defined for the type of the IFormattable implementation.formatProviderIFormatProviderThe provider to use to format the value.
-or-
A null reference (
Nothingin Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.
Returns
- string
The value of the current instance in the specified format.