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)
The reader positioned at the start of the node.
The mapping key name to treat as a discriminator.
Receives the discriminator scalar value when present on the root mapping.
This method consumes the buffered node from reader and advances it past the node.
It is primarily used by polymorphic deserialization implementations.