Parser<TBuffer> Class

Parses YAML streams.

public class Parser<TBuffer> : IParser where TBuffer : ILookAheadBuffer

Type parameters

TBuffer
Implements

Constructors

NameDescription
Parser(TBuffer, int, string?)Initializes a new instance of the IParser class.

Parser(TBuffer, int, string?)

Parser.cs

Initializes a new instance of the IParser class.

public Parser(TBuffer buffer, int maxDepth = 64, string? sourceName = null)

Parameters

buffer TBuffer
The input where the YAML stream is to be read.
maxDepth int
The maximum allowed nesting depth for mappings and sequences.
sourceName string?
The optional source name used when reporting depth-limit failures.

Properties

NameDescription
CurrentGets the current event.

Current

Parser.cs

Gets the current event.

public ParsingEvent? Current { get; }

Property value

ParsingEvent?

Methods

NameDescription
MoveNext()Moves to the next event.

MoveNext()

Parser.cs

Moves to the next event.

public bool MoveNext()

Returns

bool Returns true if there are more events available, otherwise returns false.