TomlDerivedType Class

Represents a derived type mapping for runtime polymorphic TOML configuration.

public sealed class TomlDerivedType

Constructors

NameDescription
TomlDerivedType(Type)Initializes a new instance of the TomlDerivedType class with no discriminator.
TomlDerivedType(Type, int)Initializes a new instance of the TomlDerivedType class with an integer discriminator.
TomlDerivedType(Type, string)Initializes a new instance of the TomlDerivedType class with a string discriminator.

TomlDerivedType overloads

TomlDerivedType(Type)

TomlDerivedType.cs

Initializes a new instance of the TomlDerivedType class with no discriminator.

public TomlDerivedType(Type derivedType)
Parameters
derivedType Type
The derived CLR type.

TomlDerivedType(Type, int)

TomlDerivedType.cs

Initializes a new instance of the TomlDerivedType class with an integer discriminator.

public TomlDerivedType(Type derivedType, int discriminator)
Parameters
derivedType Type
The derived CLR type.
discriminator int
The integer discriminator value.

TomlDerivedType(Type, string)

TomlDerivedType.cs

Initializes a new instance of the TomlDerivedType class with a string discriminator.

public TomlDerivedType(Type derivedType, string discriminator)
Parameters
derivedType Type
The derived CLR type.
discriminator string
The discriminator value.

Properties

NameDescription
DerivedTypeGets the derived CLR type.
DiscriminatorGets the discriminator value, or null when this is the default derived type.

Gets the derived CLR type.

public Type DerivedType { get; }

Property value

Type

Discriminator

TomlDerivedType.cs

Gets the discriminator value, or null when this is the default derived type.

public string? Discriminator { get; }

Property value

string?