Add ApiReader with generic type and expose ReadAsync #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
ApiReader<TResult>that centralises auth/header/retry logic and returns strongly typed responses.ApiReaderto inherit from the generic base soDataRowpagination + JSON parsing still work.PipeFlow.From.Apiwith typed and async entry points, and add a matching unit-test suite covering the new reader’s behaviours.Key Changes
PipeFlow/Api/ApiReaderGeneric.cs: new generic reader with typed Read/ReadAsync, HTTP retry logic, auth/header configuration, and IDisposable support.PipeFlow/Api/ApiReader.cs: now sealed and derived from the generic reader; keeps pagination, JSON parsing intoDataRow, and overridesFetchDataWithRetry.PipeFlow/PipeFlow.cs: addsApi<TResult>andApiAsync<TResult>helpers so pipelines can consume strongly typed DTOs or await the async fetch path.PipeFlow.Tests/ApiReaderGenericTests.cs: covers deserialization, sync wrapper, auth/headers, retry success/failure/default paths, header overwrites, and disposal – ensuring the generic reader is fully exercised.Why It Matters
DataRowdictionaries.