Class FixedWidthLoaderOptions

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

Configuration for a FixedWidthLoader<TRecord>, supplied to its constructor. Carries every formatting setting that is independent of the output shape; the Stream constructors take the derived FixedWidthLoaderStreamOptions, which adds the byte-encoding Encoding a TextWriter caller has already decided.

public record FixedWidthLoaderOptions : LoaderOptions, IEquatable<LoaderOptions>, IEquatable<FixedWidthLoaderOptions>
Inheritance
LoaderOptions
FixedWidthLoaderOptions
Implements
IEquatable<LoaderOptions>
Derived
Inherited Members
LoaderOptions.ToString()
LoaderOptions.GetHashCode()
LoaderOptions.Equals(LoaderOptions)
LoaderOptions.<Clone>$()
LoaderOptions.EqualityContract
LoaderOptions.ReportingInterval
LoaderOptions.MaximumItemCount
LoaderOptions.SkipItemCount
LoaderOptions.ErrorPolicy

Remarks

Every property is init-only: settle the configuration before a run rather than mutating it during one (ADR-0009). The documented defaults live on the property initializers, so no constructor can diverge from them; a null options argument means "all defaults".

Properties

FieldDelimiter

When non-null, inserted between every adjacent pair of fields. Defaults to null.

public string? FieldDelimiter { get; init; }

Property Value

string

FieldSeparator

When non-null, a separator line of this character is written after the header. Defaults to null.

public char? FieldSeparator { get; init; }

Property Value

char?

HeaderConverter

Converts a header label to its written text. Defaults to StrictHeader.

public Func<string, FieldContext, string> HeaderConverter { get; init; }

Property Value

Func<string, FieldContext, string>

Exceptions

ArgumentNullException

The value is null.

IsDryRun

Whether the load runs as a dry run: the loader enumerates the source, evaluates every record, counts and reports exactly as a real load would, but writes nothing. Defaults to false.

public bool IsDryRun { get; init; }

Property Value

bool

Schema

An explicit schema overriding the attribute-derived layout of the record type. Defaults to null.

public FixedWidthSchema? Schema { get; init; }

Property Value

FixedWidthSchema

ValueConverter

Converts a field value to its written text. Defaults to Strict.

public Func<object, FieldContext, string> ValueConverter { get; init; }

Property Value

Func<object, FieldContext, string>

Exceptions

ArgumentNullException

The value is null.

WriteHeader

Whether a header line is written before any records. Defaults to false.

public bool WriteHeader { get; init; }

Property Value

bool