Examples

The examples directory contains runnable console applications that demonstrate key features of Wolfgang.Etl.FixedWidth. Each example is a standalone project you can build and run with dotnet run.

BasicExtraction

Demonstrates the simplest extraction workflow: defining a record class with [FixedWidthField] attributes, reading fixed-width text from a StringReader, and iterating records with await foreach.

View source

BasicLoading

Demonstrates the simplest loading workflow: writing strongly typed records to fixed-width text output using a StringWriter, including padding, alignment, and pad character behavior.

View source

RoundTrip

Shows a full round-trip pipeline: extracting records from fixed-width text, then loading them back out to produce identical output. Validates that extraction and loading are symmetric.

View source

CustomParsersConverters

Demonstrates how to plug in custom ValueParser delegates for extraction and custom ValueConverter delegates for loading, enabling non-standard type conversions and formatting.

View source

ProgressReporting

Shows how to use timer-based progress reporting to receive periodic FixedWidthReport snapshots during long-running extraction or loading operations.

View source

ErrorHandling

Demonstrates BlankLineHandling and MalformedLineHandling modes, showing how to skip, error on, or pass through problematic lines during extraction.

View source

FieldDelimiter

Shows how to configure inter-field delimiters (e.g., |) between columns in the fixed-width output, and how the extractor handles delimited input.

View source

SkipAndMax

Demonstrates SkipItemCount and MaximumItemCount for pagination — skipping the first N records and capping the total number of records extracted or loaded.

View source

HeadersAndSeparators

Shows how to enable header row output and separator lines when loading, including custom header text via the Header property on [FixedWidthField].

View source