BufferCurrentNodeToStringAndFindDiscriminator(YamlReader, String, out String?) Method

Definition

Assembly SharpYaml.dll

Buffers the current YAML node to a string while optionally extracting a discriminator value from the root mapping.

public static string BufferCurrentNodeToStringAndFindDiscriminator(YamlReader reader, string discriminatorPropertyName, scoped out string? discriminatorValue)

Parameters

reader
YamlReader

The reader positioned at the start of the node.

discriminatorPropertyName
String

The mapping key name to treat as a discriminator.

discriminatorValue
String

Receives the discriminator scalar value when present on the root mapping.

Returns

String
The buffered YAML for the node.

Remarks

This method consumes the buffered node from reader and advances it past the node. It is primarily used by polymorphic deserialization implementations.