CsvConverterContext Class
The context of the conversion of the values of a column.
public sealed class CsvConverterContextConstructors
| Name | Description |
|---|---|
| CsvConverterContext(CsvSerializerOptions, string?, string?) | Initializes a new instance of the CsvConverterContext class. |
CsvConverterContext(CsvSerializerOptions, string?, string?)
CsvConverterContext.csInitializes a new instance of the CsvConverterContext class.
public CsvConverterContext(CsvSerializerOptions options, string? format = null, string? memberName = null)Parameters
optionsCsvSerializerOptions- The options of the serializer.
formatstring?- The format string of the column, or
nullfor the default format. memberNamestring?- The name of the member of the column, or
null.
Properties
| Name | Description |
|---|---|
| Format | Gets the format string set with CsvFormatAttribute, or null for the default format. |
| FormatProvider | Gets the format provider: CsvSerializerOptions.FormatProvider, or CultureInfo.InvariantCulture. |
| MemberName | Gets the name of the member of the column, or null. |
| Options | Gets the options of the serializer. |
Format
CsvConverterContext.csGets the format string set with CsvFormatAttribute, or null for the default format.
public string? Format { get; }Property value
FormatProvider
CsvConverterContext.csGets the format provider: CsvSerializerOptions.FormatProvider, or CultureInfo.InvariantCulture.
public IFormatProvider FormatProvider { get; }