Interface IFixedWidthExtractorBuilder<T>
- Namespace
- Wolfgang.Etl.FixedWidth
- Assembly
- Wolfgang.Etl.FixedWidth.dll
A fluent builder for a fixed-width extraction stage of a generic Wolfgang.Etl.Abstractions.EtlPipeline. Returned
by the FixedWidthExtractor source factories in EtlPipelineFixedWidthExtensions.
public interface IFixedWidthExtractorBuilder<T> : IEtlPipeline<T> where T : notnull, new()
Type Parameters
TThe record type produced by the extractor.
- Inherited Members
-
IEtlPipeline<T>.Through<TOut>(ITransformAsync<T, TOut>)IEtlPipeline<T>.Through<TOut>(ITransformWithCancellationAsync<T, TOut>)IEtlPipeline<T>.To<TProgress>(LoaderBase<T, TProgress>)
- Extension Methods
Remarks
Each configuration method maps one-to-one to a settable property on
FixedWidthExtractor<TRecord> and returns the same builder so calls
chain. Configuration is recorded and applied when the first pipeline operation — a Through
stage, a sink terminator such as FixedWidthLoader, or
AsAsyncEnumerable(CancellationToken) — materializes the extractor; calling a setter after
that throws InvalidOperationException.
Methods
BlankLineHandling(BlankLineHandling)
Sets BlankLineHandling — how a zero-length line is handled.
IFixedWidthExtractorBuilder<T> BlankLineHandling(BlankLineHandling handling)
Parameters
handlingBlankLineHandlingThe blank-line policy.
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.
Encoding(Encoding)
Sets the text encoding used to decode the source. Applies only to the path- and stream-based factories; a caller-supplied reader or extractor already carries its own encoding. Defaults to UTF8.
IFixedWidthExtractorBuilder<T> Encoding(Encoding encoding)
Parameters
encodingEncodingThe encoding to decode with.
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.
FieldDelimiter(string?)
Sets FieldDelimiter — the delimiter present between fields in the source, or null for pure fixed-width input.
IFixedWidthExtractorBuilder<T> FieldDelimiter(string? delimiter)
Parameters
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.
FieldSeparator(char?)
Sets FieldSeparator — when non-null, the line after the header is treated as a separator and skipped.
IFixedWidthExtractorBuilder<T> FieldSeparator(char? separator)
Parameters
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.
HasHeader(bool)
Sets HasHeader — the single-header-line convenience over HeaderLineCount(int).
IFixedWidthExtractorBuilder<T> HasHeader(bool hasHeader)
Parameters
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.
HeaderLineCount(int)
Sets HeaderLineCount — the number of header lines to skip before the first record.
IFixedWidthExtractorBuilder<T> HeaderLineCount(int count)
Parameters
countintThe number of leading lines to skip.
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.
LineFilter(Func<string, LineAction>)
Sets LineFilter — a per-line predicate evaluated before parsing that can process, skip, or stop.
IFixedWidthExtractorBuilder<T> LineFilter(Func<string, LineAction> filter)
Parameters
filterFunc<string, LineAction>The line filter.
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.
MalformedLineHandling(MalformedLineHandling)
Sets MalformedLineHandling — how a line that is too short or cannot be converted is handled.
IFixedWidthExtractorBuilder<T> MalformedLineHandling(MalformedLineHandling handling)
Parameters
handlingMalformedLineHandlingThe malformed-line policy.
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.
RecordValidator(Func<T, ValidationResult>)
Sets RecordValidator — a per-record callback that can accept, skip, or stop after parsing.
IFixedWidthExtractorBuilder<T> RecordValidator(Func<T, ValidationResult> validator)
Parameters
validatorFunc<T, ValidationResult>The record validator.
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.
ValueParser(FixedWidthValueParser)
Sets ValueParser — the delegate that converts a raw field string into the target property type.
IFixedWidthExtractorBuilder<T> ValueParser(FixedWidthValueParser parser)
Parameters
parserFixedWidthValueParserThe value parser.
Returns
- IFixedWidthExtractorBuilder<T>
The same builder, for chaining.