YamlDerivedType struct

Represents a supported derived type defined in the metadata of a polymorphic type.

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

public readonly struct YamlDerivedType

Represents a supported derived type defined in the metadata of a polymorphic type.

ConstructorsLink to this heading

Specifies a supported derived type without a type discriminator.

public YamlDerivedType(Type derivedType);

Parameters

  • derivedType: The derived type to be supported by the polymorphic type metadata.

Specifies a supported derived type with an integer type discriminator.

public YamlDerivedType(Type derivedType, int typeDiscriminator);

Parameters

  • derivedType: The derived type to be supported by the polymorphic type metadata.
  • typeDiscriminator: The type discriminator to be associated with the derived type.

Specifies a supported derived type with a string type discriminator.

public YamlDerivedType(Type derivedType, string typeDiscriminator);

Parameters

  • derivedType: The derived type to be supported by the polymorphic type metadata.
  • typeDiscriminator: The type discriminator to be associated with the derived type.

PropertiesLink to this heading

DerivedTypeLink to this heading

A derived type that should be supported in polymorphic serialization of the declared base type.

public Type DerivedType { get; }

TagLink to this heading

The YAML tag of the derived type under YamlTypeDiscriminatorStyle.Tag and YamlTypeDiscriminatorStyle.Both (YamlDerivedTypeAttribute.Tag); when unset, ! followed by the type discriminator.

public string? Tag { get; init; }

TypeDiscriminatorLink to this heading

The type discriminator identifier to be used for the serialization of the subtype.

public object? TypeDiscriminator { get; }

Generated from the XML documentation of the libraryBuilt with Douze

Esc to close