HumanReadableConverterAttribute Class

Specifies the converter to use when serializing a type, property, or field.

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface, AllowMultiple = false)]
public sealed class HumanReadableConverterAttribute : HumanReadableAttribute
Inheritance
HumanReadableAttribute HumanReadableConverterAttribute

Constructors

NameDescription
HumanReadableConverterAttribute(HumanReadableConverter)Initializes a new instance of the HumanReadableConverterAttribute class with a converter instance.
HumanReadableConverterAttribute(Type)Initializes a new instance of the HumanReadableConverterAttribute class with a converter type.

HumanReadableConverterAttribute overloads

HumanReadableConverterAttribute(HumanReadableConverter)

HumanReadableConverterAttribute.cs

Initializes a new instance of the HumanReadableConverterAttribute class with a converter instance.

public HumanReadableConverterAttribute(HumanReadableConverter converterInstance)
Parameters
converterInstance HumanReadableConverter
The converter instance to use.

HumanReadableConverterAttribute(Type)

HumanReadableConverterAttribute.cs

Initializes a new instance of the HumanReadableConverterAttribute class with a converter type.

public HumanReadableConverterAttribute(Type converterType)
Parameters
converterType Type
The type of the converter to use.

Properties

NameDescription
ConverterInstanceGets the converter instance.
ConverterTypeGets the type of the converter.

Gets the converter instance.

public HumanReadableConverter? ConverterInstance { get; }

Gets the type of the converter.

public Type ConverterType { get; }

Property value

Type