TryAddDeserializationDiagnostic(TomlReader, TomlTokenType, Nullable, TomlException) Method

Definition

Assembly Tomlyn.dll

Records a recoverable deserialization diagnostic and skips the current TOML value when the reader is still positioned on the same token that failed.

protected static bool TryAddDeserializationDiagnostic(TomlReader reader, TomlTokenType tokenType, TomlSourceSpan? span, TomlException exception)

Parameters

reader
TomlReader

The TOML reader.

tokenType
TomlTokenType

The token type before the read attempt.

span
Nullable<TomlSourceSpan>

The source span before the read attempt.

exception
TomlException

The exception raised by the read attempt.

Returns

Boolean
true when the diagnostic was recorded and the current value was skipped.