YamlDerivedType Class
Represents a derived type mapping for runtime polymorphic configuration.
public sealed class YamlDerivedTypeConstructors
| Name | Description |
|---|---|
| YamlDerivedType(Type) | Initializes a new instance with no discriminator. When YamlDerivedType.Tag is also null, this derived type becomes the default when no discriminator or tag matches. When YamlDerivedType.Tag is set, this entry participates only in tag-based dispatch and does not become the default. |
| YamlDerivedType(Type, int) | Initializes a new instance with an integer discriminator. |
| YamlDerivedType(Type, string) | Initializes a new instance with a string discriminator. |
YamlDerivedType overloads
YamlDerivedType(Type)
YamlDerivedType.csInitializes a new instance with no discriminator. When YamlDerivedType.Tag is also null, this derived type becomes the default when no discriminator or tag matches. When YamlDerivedType.Tag is set, this entry participates only in tag-based dispatch and does not become the default.
public YamlDerivedType(Type derivedType)YamlDerivedType(Type, int)
YamlDerivedType.csInitializes a new instance with an integer discriminator.
YamlDerivedType(Type, string)
YamlDerivedType.csInitializes a new instance with a string discriminator.
Properties
| Name | Description |
|---|---|
| DerivedType | Gets the derived CLR type. |
| Discriminator | Gets the discriminator value, or null if this is the default derived type. |
| Tag | Gets or sets an optional explicit YAML tag for the derived type. |