Class CsvFieldAttribute
- Namespace
- NuvTools.Report.Sheet.Csv.Attributes
- Assembly
- NuvTools.Report.dll
Maps a property to a CSV field by position and provides optional conversion settings.
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class CsvFieldAttribute : Attribute
- Inheritance
-
CsvFieldAttribute
- Inherited Members
Constructors
CsvFieldAttribute(int)
Initializes a new instance of CsvFieldAttribute with the specified zero-based field position.
public CsvFieldAttribute(int order)
Parameters
orderintThe zero-based position of the field in the CSV record.
Properties
Caption
Gets or sets a display name for the field.
public string? Caption { get; set; }
Property Value
Converter
Gets or sets the type of an IFieldConverter implementation used to convert the raw string value.
public Type? Converter { get; set; }
Property Value
Format
Gets or sets a format string passed to the converter (e.g. "yyyyMMdd" for dates).
public string? Format { get; set; }
Property Value
Order
Gets the zero-based position of the field in the CSV record.
public int Order { get; }
Property Value
Trim
Gets or sets the trim mode applied to the raw field value before conversion. Defaults to None.
public TrimMode Trim { get; set; }