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
CsvAttributeCsvSourceGenerationOptionsAttribute
Constructors
| Name | Description |
|---|---|
| CsvSourceGenerationOptionsAttribute() |
CsvSourceGenerationOptionsAttribute()
CsvSourceGenerationOptionsAttribute.cspublic CsvSourceGenerationOptionsAttribute()No documentation is available.
Properties
| Name | Description |
|---|---|
| HasHeaderRow | Gets or sets a value indicating whether the data has a header row. Default is true. |
| IncludeFields | Gets or sets a value indicating whether public fields are serialized. Default is false. |
| MissingColumnHandling | Gets or sets how a member without a column is handled. Default is CsvMissingColumnHandling.Ignore. |
| NewLine | Gets or sets the string written at the end of each row. Default is \r\n. |
| PropertyNameCaseInsensitive | Gets or sets a value indicating whether column names are matched ignoring case. Default is false. |
| PropertyNamingPolicy | Gets or sets the naming policy of the column names. Default is CsvKnownNamingPolicy.Unspecified: the names of the members. |
| Separator | Gets or sets the separator. Default is ,. |
| UnmappedColumnHandling | Gets or sets how a column without a member is handled. Default is CsvUnmappedColumnHandling.Ignore. |
HasHeaderRow
CsvSourceGenerationOptionsAttribute.csIncludeFields
CsvSourceGenerationOptionsAttribute.csMissingColumnHandling
CsvSourceGenerationOptionsAttribute.csGets or sets how a member without a column is handled. Default is CsvMissingColumnHandling.Ignore.
public CsvMissingColumnHandling MissingColumnHandling { get; set; }Property value
PropertyNameCaseInsensitive
CsvSourceGenerationOptionsAttribute.csPropertyNamingPolicy
CsvSourceGenerationOptionsAttribute.csGets 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
UnmappedColumnHandling
CsvSourceGenerationOptionsAttribute.csGets or sets how a column without a member is handled. Default is CsvUnmappedColumnHandling.Ignore.
public CsvUnmappedColumnHandling UnmappedColumnHandling { get; set; }