CsvPropertyInfoValues<TDeclaring, TValue> Class

Describes a column to CsvMetadataServices.CreatePropertyInfo. Used by the source generator and by the reflection-based metadata.

public sealed class CsvPropertyInfoValues<TDeclaring, TValue>

Type parameters

TDeclaring
The type that declares the member.
TValue
The type of the member.

Constructors

NameDescription
CsvPropertyInfoValues()

CsvPropertyInfoValues()

CsvPropertyInfoValues`2.cs
  • Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public CsvPropertyInfoValues()

No documentation is available.

Properties

NameDescription
ColumnIndexGets the index set with CsvColumnIndexAttribute, or null.
ColumnNameGets the name of the column set with CsvPropertyNameAttribute, or null to apply CsvSerializerOptions.PropertyNamingPolicy to CsvPropertyInfoValues<TDeclaring, TValue>.MemberName.
ConverterGets the converter set with CsvConverterAttribute, or null.
DefaultConverterGets the converter to use when neither CsvPropertyInfoValues<TDeclaring, TValue>.Converter nor CsvSerializerOptions.Converters converts TValue, or null for the built-in converters.
FormatGets the format string set with CsvFormatAttribute, or null.
GetterGets the function that gets the value of the member, or null when the column is not written.
IsRequiredGets a value indicating whether the column is required.
MemberNameGets the name of the member.
OrderGets the order set with CsvPropertyOrderAttribute.
ParameterIndexGets the position of the constructor parameter that receives the value of the column, or -1.
SetterGets the function that sets the value of the member, or null when the member is set by the constructor or is not read.

Gets the index set with CsvColumnIndexAttribute, or null.

public int? ColumnIndex { get; init; }

Property value

int?

public string? ColumnName { get; init; }

Property value

string?

Gets the converter set with CsvConverterAttribute, or null.

public CsvConverter? Converter { get; init; }

Property value

CsvConverter?

Gets the converter to use when neither CsvPropertyInfoValues<TDeclaring, TValue>.Converter nor CsvSerializerOptions.Converters converts TValue, or null for the built-in converters.

public CsvConverter<TValue>? DefaultConverter { get; init; }

Property value

CsvConverter<TValue>?

Gets the format string set with CsvFormatAttribute, or null.

public string? Format { get; init; }

Property value

string?

Gets the function that gets the value of the member, or null when the column is not written.

public Func<TDeclaring, TValue>? Getter { get; init; }

Gets a value indicating whether the column is required.

public bool IsRequired { get; init; }

Property value

bool

Gets the name of the member.

public required string MemberName { get; init; }

Property value

string

Gets the order set with CsvPropertyOrderAttribute.

public int Order { get; init; }

Property value

int

Gets the position of the constructor parameter that receives the value of the column, or -1.

public int ParameterIndex { get; init; }

Property value

int

Gets the function that sets the value of the member, or null when the member is set by the constructor or is not read.

public CsvPropertySetter<TDeclaring, TValue>? Setter { get; init; }