CsvSourceGenerationOptionsAttribute Class

Sets the options of the Default instance of a generated CsvSerializerContext, and the members the generator includes.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class CsvSourceGenerationOptionsAttribute : CsvAttribute
Inheritance
CsvAttribute CsvSourceGenerationOptionsAttribute

Constructors

NameDescription
CsvSourceGenerationOptionsAttribute()

CsvSourceGenerationOptionsAttribute()

CsvSourceGenerationOptionsAttribute.cs
public CsvSourceGenerationOptionsAttribute()

No documentation is available.

Properties

NameDescription
HasHeaderRowGets or sets a value indicating whether the data has a header row. Default is true.
IncludeFieldsGets or sets a value indicating whether public fields are serialized. Default is false.
MissingColumnHandlingGets or sets how a member without a column is handled. Default is CsvMissingColumnHandling.Ignore.
NewLineGets or sets the string written at the end of each row. Default is \r\n.
PropertyNameCaseInsensitiveGets or sets a value indicating whether column names are matched ignoring case. Default is false.
PropertyNamingPolicyGets or sets the naming policy of the column names. Default is CsvKnownNamingPolicy.Unspecified: the names of the members.
SeparatorGets or sets the separator. Default is ,.
UnmappedColumnHandlingGets or sets how a column without a member is handled. Default is CsvUnmappedColumnHandling.Ignore.

Gets or sets a value indicating whether the data has a header row. Default is true.

public bool HasHeaderRow { get; set; }

Property value

bool

Gets or sets a value indicating whether public fields are serialized. Default is false.

public bool IncludeFields { get; set; }

Property value

bool

Gets or sets how a member without a column is handled. Default is CsvMissingColumnHandling.Ignore.

public CsvMissingColumnHandling MissingColumnHandling { get; set; }

Gets or sets the string written at the end of each row. Default is \r\n.

public string NewLine { get; set; }

Property value

string

PropertyNameCaseInsensitive

CsvSourceGenerationOptionsAttribute.cs

Gets or sets a value indicating whether column names are matched ignoring case. Default is false.

public bool PropertyNameCaseInsensitive { get; set; }

Property value

bool

Gets or sets the naming policy of the column names. Default is CsvKnownNamingPolicy.Unspecified: the names of the members.

public CsvKnownNamingPolicy PropertyNamingPolicy { get; set; }

Property value

CsvKnownNamingPolicy

Gets or sets the separator. Default is ,.

public char Separator { get; set; }

Property value

char

Gets or sets how a column without a member is handled. Default is CsvUnmappedColumnHandling.Ignore.

public CsvUnmappedColumnHandling UnmappedColumnHandling { get; set; }