Class HumlConverterAttribute

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

Specifies the converter type to use when serialising or deserialising the annotated property, class, or struct. The converter type must derive from HumlConverter.

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

Remarks

Priority order: property-level [HumlConverter] > type-level [HumlConverter] > HumlOptions.Converters list > built-in dispatch.

Constructors

HumlConverterAttribute(Type)

Initialises a new instance specifying the converter type.

public HumlConverterAttribute(Type converterType)

Parameters

converterType Type

The converter type. Must derive from HumlConverter.

Properties

ConverterType

The converter type to use. Must be a concrete type deriving from HumlConverter with a public parameterless constructor.

public Type ConverterType { get; }

Property Value

Type