Table of Contents

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

position TextPosition

The value of Position.

message object

The value of Message.

Exceptions

ArgumentNullException

message is null.

Properties

Message

An object that describes the message.

public object Message { get; }

Property Value

object

Position

The position the message was reported at.

public TextPosition Position { get; }

Property Value

TextPosition

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

format string

The format to use.

-or-

A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

formatProvider IFormatProvider

The provider to use to format the value.

-or-

A null reference (Nothing in 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.