TryDeserialize(TextReader, YamlSerializerContext, out T?) Method

Definition

Namespace SharpYaml
Assembly SharpYaml.dll

Attempts to deserialize YAML from a text reader using generated metadata from a serializer context.

public static bool TryDeserialize<T>(TextReader reader, YamlSerializerContext context, scoped out T? value)

Type parameters

T
The destination CLR type.

Parameters

reader
TextReader

The source reader.

context
YamlSerializerContext

The source-generated serializer context.

value
{T}

The deserialized value when successful; otherwise default.

Returns

Boolean
true when deserialization succeeded; otherwise false.