Interface IFixedWidthLoaderBuilder<T>
- Namespace
- Wolfgang.Etl.FixedWidth
- Assembly
- Wolfgang.Etl.FixedWidth.dll
A fluent builder for a fixed-width loader that terminates a generic Wolfgang.Etl.Abstractions.EtlPipeline.
Returned by the FixedWidthLoader sink terminators in
EtlPipelineFixedWidthExtensions.
public interface IFixedWidthLoaderBuilder<T> : IEtlPipelineSink where T : notnull
Type Parameters
TThe record type consumed by the loader.
- Inherited Members
Remarks
Each configuration method maps one-to-one to a settable property on FixedWidthLoader<TRecord> and returns the same builder so calls chain. Because the builder is an Wolfgang.Etl.Abstractions.IEtlPipelineSink, the loader is materialized and the pipeline runs when RunAsync(IProgress<EtlPipelineProgress>, CancellationToken) is called.
Methods
Encoding(Encoding)
Sets the text encoding used to encode the output. Applies only to the path- and stream-based terminators; a caller-supplied writer already carries its own encoding. Defaults to UTF8.
IFixedWidthLoaderBuilder<T> Encoding(Encoding encoding)
Parameters
encodingEncodingThe encoding to write with.
Returns
- IFixedWidthLoaderBuilder<T>
The same builder, for chaining.
FieldDelimiter(string?)
Sets FieldDelimiter — a string written between adjacent fields on every line, or null for pure fixed-width output.
IFixedWidthLoaderBuilder<T> FieldDelimiter(string? delimiter)
Parameters
Returns
- IFixedWidthLoaderBuilder<T>
The same builder, for chaining.
FieldSeparator(char?)
Sets FieldSeparator — when non-null (and a header is written), a separator line of the given character is written after the header.
IFixedWidthLoaderBuilder<T> FieldSeparator(char? separator)
Parameters
Returns
- IFixedWidthLoaderBuilder<T>
The same builder, for chaining.
HeaderConverter(Func<string, FieldContext, string>)
Sets HeaderConverter — the delegate that renders a header label to its string form. Only used when WriteHeader(bool) is enabled.
IFixedWidthLoaderBuilder<T> HeaderConverter(Func<string, FieldContext, string> converter)
Parameters
converterFunc<string, FieldContext, string>The header converter.
Returns
- IFixedWidthLoaderBuilder<T>
The same builder, for chaining.
IsDryRun(bool)
Sets IsDryRun — when enabled the pipeline runs and validates but writes nothing to the output.
IFixedWidthLoaderBuilder<T> IsDryRun(bool isDryRun)
Parameters
Returns
- IFixedWidthLoaderBuilder<T>
The same builder, for chaining.
ValueConverter(Func<object, FieldContext, string>)
Sets ValueConverter — the delegate that renders a field value to its string form before padding.
IFixedWidthLoaderBuilder<T> ValueConverter(Func<object, FieldContext, string> converter)
Parameters
converterFunc<object, FieldContext, string>The value converter.
Returns
- IFixedWidthLoaderBuilder<T>
The same builder, for chaining.
WriteHeader(bool)
Sets WriteHeader — whether a header line is written before the records.
IFixedWidthLoaderBuilder<T> WriteHeader(bool writeHeader)
Parameters
Returns
- IFixedWidthLoaderBuilder<T>
The same builder, for chaining.