CsvObjectInfoValues<T> Class

Describes a type to CsvMetadataServices.CreateObjectInfo. Used by the source generator and by the reflection-based metadata.

public sealed class CsvObjectInfoValues<T>

Type parameters

T
The type described.

Constructors

NameDescription
CsvObjectInfoValues()

CsvObjectInfoValues()

  • 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 CsvObjectInfoValues()

No documentation is available.

Properties

NameDescription
ConstructorParametersGets the parameters of the constructor used by CsvObjectInfoValues<T>.ObjectWithParameterizedConstructorCreator, ordered by position.
MembersReaderGets the method that sets the members from a record of UTF-16 data, or null to set them with CsvPropertyInfoValues<TDeclaring, TValue>.Setter.
ObjectCreatorGets the function that creates an instance with the parameterless constructor, or null.
ObjectWithParameterizedConstructorCreatorGets the function that creates an instance with the values of the constructor parameters, or null.
PropertiesGets the columns of the type, in declaration order, base types first.
Utf8MembersReaderGets the method that sets the members from a record of UTF-8 data, or null. See CsvObjectInfoValues<T>.MembersReader.

ConstructorParameters

CsvObjectInfoValues`1.cs

Gets the parameters of the constructor used by CsvObjectInfoValues<T>.ObjectWithParameterizedConstructorCreator, ordered by position.

public IReadOnlyList<CsvParameterInfoValues>? ConstructorParameters { get; init; }

Gets the method that sets the members from a record of UTF-16 data, or null to set them with CsvPropertyInfoValues<TDeclaring, TValue>.Setter.

public CsvMembersReader<T>? MembersReader { get; init; }

Property value

CsvMembersReader<T>?

Remarks

The source generator writes it, so that the value of each member is converted and set without a virtual call, and its converter can be inlined. It is used when the columns of the members it sets are in the order of CsvObjectInfoValues<T>.Properties, and there is no CsvSerializerOptions.DeserializationErrorHandler: the members are then set in the order of the columns, and an error throws.

Gets the function that creates an instance with the parameterless constructor, or null.

public Func<T>? ObjectCreator { get; init; }

Property value

Func<T>?

ObjectWithParameterizedConstructorCreator

CsvObjectInfoValues`1.cs

Gets the function that creates an instance with the values of the constructor parameters, or null.

public Func<CsvConstructorArguments, T>? ObjectWithParameterizedConstructorCreator { get; init; }

Gets the columns of the type, in declaration order, base types first.

public required IReadOnlyList<CsvPropertyInfo> Properties { get; init; }

Utf8MembersReader

CsvObjectInfoValues`1.cs

Gets the method that sets the members from a record of UTF-8 data, or null. See CsvObjectInfoValues<T>.MembersReader.

public Utf8CsvMembersReader<T>? Utf8MembersReader { get; init; }