Class HumlDerivedTypeAttribute

Namespace
Huml.Net.Serialization
Assembly
Huml.Net.dll

Registers a concrete derived type and its discriminator label on the polymorphic base class. Repeatable — add one attribute per concrete subtype.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
public sealed class HumlDerivedTypeAttribute : Attribute
Inheritance
HumlDerivedTypeAttribute
Inherited Members

Constructors

HumlDerivedTypeAttribute(Type, string)

Registers a concrete derived type with its discriminator label.

public HumlDerivedTypeAttribute(Type derivedType, string typeDiscriminator)

Parameters

derivedType Type

The concrete derived type.

typeDiscriminator string

The discriminator string label that identifies this derived type.

Properties

DerivedType

The concrete derived type.

public Type DerivedType { get; }

Property Value

Type

TypeDiscriminator

The discriminator string label that identifies this derived type.

public string TypeDiscriminator { get; }

Property Value

string