Class ColumnAttribute

Namespace
ProtoTest.Sheets
Assembly
ProtoTest.Sheets.dll

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

path string[]

Properties

Max

Largest allowed number; the default means no maximum.

public double Max { get; init; }

Property Value

double

Min

Smallest allowed number; the default means no minimum.

public double Min { get; init; }

Property Value

double

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

bool

Path

public IReadOnlyList<string> Path { get; }

Property Value

IReadOnlyList<string>

Pattern

Regular expression every text value must match.

public string? Pattern { get; init; }

Property Value

string

Unique

Every value in the column must be distinct.

public bool Unique { get; init; }

Property Value

bool