CsvConverterFactory Class

Creates converters for a family of types, such as the enumerations or the generic instances of a type.

public abstract class CsvConverterFactory : CsvConverter
Inheritance
CsvConverter CsvConverterFactory

Constructors

NameDescription
CsvConverterFactory()Initializes a new instance of the CsvConverterFactory class.

CsvConverterFactory()

CsvConverterFactory.cs

Initializes a new instance of the CsvConverterFactory class.

protected CsvConverterFactory()

Properties

NameDescription
TypeToConvertGets the type the converter converts, or null for a CsvConverterFactory.

Gets the type the converter converts, or null for a CsvConverterFactory.

public sealed override Type? TypeToConvert { get; }

Property value

Type?

Methods

NameDescription
CreateConverter(Type, CsvSerializerOptions)Creates a converter for the specified type.

CreateConverter(Type, CsvSerializerOptions)

Creates a converter for the specified type.

public abstract CsvConverter? CreateConverter(Type typeToConvert, CsvSerializerOptions options)

Parameters

typeToConvert Type
The type of the values, for which CsvConverter.CanConvert returned true.
options CsvSerializerOptions
The options of the serializer.

Returns

CsvConverter? A CsvConverter<T> for typeToConvert.