Class ColumnAttribute
Binds one record property to a header path, for example [Column("FY26", "Amount")].
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Parameter)]
public sealed class ColumnAttribute : Attribute
- Inheritance
-
ColumnAttribute
- Inherited Members
- Extension Methods
Constructors
ColumnAttribute(params string[])
Binds one record property to a header path, for example [Column("FY26", "Amount")].
public ColumnAttribute(params string[] path)
Parameters
pathstring[]
Properties
Max
Largest allowed number; the default means no maximum.
public double Max { get; init; }
Property Value
Min
Smallest allowed number; the default means no minimum.
public double Min { get; init; }
Property Value
OneOf
The only text values allowed.
public string[]? OneOf { get; init; }
Property Value
- string[]
Optional
When true an empty cell is fine; the property then needs a nullable type.
public bool Optional { get; init; }
Property Value
Path
public IReadOnlyList<string> Path { get; }
Property Value
Pattern
Regular expression every text value must match.
public string? Pattern { get; init; }
Property Value
Unique
Every value in the column must be distinct.
public bool Unique { get; init; }