YamlConverterAttribute Class

Specifies a custom YamlConverter to use when serializing or deserializing a member or type.

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

Constructors

NameDescription
YamlConverterAttribute(Type)Initializes a new instance of the YamlConverterAttribute class.

YamlConverterAttribute(Type)

YamlConverterAttribute.cs

Initializes a new instance of the YamlConverterAttribute class.

public YamlConverterAttribute(Type converterType)

Parameters

converterType Type
The converter type.

Exceptions

ArgumentNullException
converterType is null.

Properties

NameDescription
ConverterTypeGets the converter type.

Gets the converter type.

public Type ConverterType { get; }

Property value

Type