Class FieldContext

Namespace
Wolfgang.Etl.FixedWidth
Assembly
Wolfgang.Etl.FixedWidth.dll

Provides contextual information about a fixed-width field to a ValueConverter or ValueParser delegate.

public sealed class FieldContext
Inheritance
FieldContext
Inherited Members

Remarks

An instance of this class is constructed by the framework for each field and passed to the delegate along with the raw value. It is immutable — the delegate may read from it but cannot modify it.

Properties

Alignment

The alignment applied when padding the converted value.

public FieldAlignment Alignment { get; }

Property Value

FieldAlignment

FieldLength

The maximum number of characters this field may occupy, as defined by Length.

public int FieldLength { get; }

Property Value

int

Format

The optional format string defined on the field attribute, or null if none was specified.

public string? Format { get; }

Property Value

string

HeaderLabel

The header label for this field — either the value of Header if set, or the property name.

public string HeaderLabel { get; }

Property Value

string

Pad

The character used to pad the converted value to FieldLength.

public char Pad { get; }

Property Value

char

PropertyName

The name of the property being converted or parsed.

public string PropertyName { get; }

Property Value

string

PropertyType

The CLR type of the property being parsed. Available to ValueParser delegates so the parser knows what type to return.

public Type PropertyType { get; }

Property Value

Type