TomlPolymorphicAttribute Class
Marks a base type as polymorphic for TOML serialization.
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
public sealed class TomlPolymorphicAttribute : TomlAttribute- Inheritance
TomlAttributeTomlPolymorphicAttribute
Constructors
| Name | Description |
|---|---|
| TomlPolymorphicAttribute() |
TomlPolymorphicAttribute()
TomlPolymorphicAttribute.cspublic TomlPolymorphicAttribute()No documentation is available.
Properties
| Name | Description |
|---|---|
| TypeDiscriminatorPropertyName | Gets or sets the discriminator property name. |
| UnknownDerivedTypeHandling | Gets or sets the behavior when an unknown discriminator is encountered. When set to a value other than TomlUnknownDerivedTypeHandling.Unspecified, this overrides the global TomlPolymorphismOptions.UnknownDerivedTypeHandling. |
TypeDiscriminatorPropertyName
TomlPolymorphicAttribute.csUnknownDerivedTypeHandling
TomlPolymorphicAttribute.csGets or sets the behavior when an unknown discriminator is encountered. When set to a value other than TomlUnknownDerivedTypeHandling.Unspecified, this overrides the global TomlPolymorphismOptions.UnknownDerivedTypeHandling.
public TomlUnknownDerivedTypeHandling UnknownDerivedTypeHandling { get; set; }Property value
TomlUnknownDerivedTypeHandling
Exceptions
ArgumentOutOfRangeException- Value is not a defined
TomlUnknownDerivedTypeHandling.