YamlTypeDiscriminatorStyle enum

How a polymorphic type writes which derived type a value is (M5d). Reading accepts the $type property under every style, and a tag under YamlTypeDiscriminatorStyle.Tag and YamlTypeDiscriminatorStyle.Both.

Namespace: System.Text.Yaml.Serialization ยท Assembly: Styml.dll

public enum YamlTypeDiscriminatorStyle

How a polymorphic type writes which derived type a value is (M5d). Reading accepts the $type property under every style, and a tag under YamlTypeDiscriminatorStyle.Tag and YamlTypeDiscriminatorStyle.Both.

FieldsLink to this heading

Name Value Description
Property 0 The $type property (or the configured name), as System.Text.Json. The default.
Tag 1 A YAML tag on the node (!dog): the derived type's Tag, or ! followed by its type discriminator. A polymorphic collection is a tagged sequence, without the $type/$values wrapper. The JSON-compatible writer, which cannot write a tag, writes the property.
Both 2 The tag and the property, both; on read, a tag and a property that select different types are an error.

Generated from the XML documentation of the libraryBuilt with Douze

Esc to close