YamlTagMappingAttribute class
Adds an entry to the source-generated options' YamlSerializerOptions.TagMappings: the YAML tag given first reads and writes the type given second, which the context then also generates.
Namespace: System.Text.Yaml.Serialization ยท Assembly: Styml.dll
public sealed class YamlTagMappingAttribute : YamlAttribute
Inheritance: object โ Attribute โ YamlAttribute โ YamlTagMappingAttribute
Adds an entry to the source-generated options' YamlSerializerOptions.TagMappings: the YAML tag given first reads and writes the type given second, which the context then also generates.
ConstructorsLink to this heading
Initializes a new instance with the tag and the type it selects.
public YamlTagMappingAttribute(string tag, Type type);
Parameters
tag: A local tag (!dog) or a global tag URI (tag:example.com,2000:dog).type: The type the tag selects.
PropertiesLink to this heading
TagLink to this heading
The tag.
public string Tag { get; }
TypeLink to this heading
The type the tag selects.
public Type Type { get; }