YamlConverterFactory class

Supports converting several types by using a factory pattern.

Namespace: System.Text.Yaml.Serialization · Assembly: Styml.dll

public abstract class YamlConverterFactory : YamlConverter

Inheritance: object → YamlConverter → YamlConverterFactory
Derived: YamlNumberEnumConverter<TEnum>, YamlStringEnumConverter, YamlStringEnumConverter<TEnum>

Supports converting several types by using a factory pattern.

RemarksLink to this heading

This is useful for converters supporting generics, such as a converter for List<T>.

ConstructorsLink to this heading

When overridden, constructs a new YamlConverterFactory instance.

protected YamlConverterFactory();

PropertiesLink to this heading

TypeLink to this heading

Gets the type being converted by the current converter instance.

public sealed override Type? Type { get; }

For instances of type YamlConverter<T> returns typeof(T), and for instances of type YamlConverterFactory returns null.

MethodsLink to this heading

CreateConverterLink to this heading

Create a converter for the provided Type.

public abstract YamlConverter? CreateConverter(Type typeToConvert, YamlSerializerOptions options);

Parameters

Returns: An instance of a YamlConverter<T> where T is compatible with typeToConvert. If null is returned, a NotSupportedException will be thrown.

Generated from the XML documentation of the libraryBuilt with Douze

Esc to close