Files
jdescopingtool/NEW/src/JdeScoping.DataSync/Contracts/IDataFetcher.cs
T
Joseph Doherty 26ff8d9b4f Initial commit: JDE Scoping Tool migration project
Set up repository with legacy .NET Framework 4.8 source (OLD/),
new .NET 10 Blazor solution (NEW/), OpenSpec specifications,
documentation, and project configuration.
2026-01-02 07:43:29 -05:00

24 lines
969 B
C#

namespace JdeScoping.DataSync.Contracts;
/// <summary>
/// Interface for fetching data from source systems (JDE/CMS).
/// </summary>
/// <typeparam name="TEntity">The entity type being fetched.</typeparam>
public interface IDataFetcher<TEntity> where TEntity : class
{
/// <summary>
/// Fetches entities from source system as an async stream.
/// </summary>
/// <param name="minimumDt">For incremental fetches, only return records modified after this time. Null for full fetch.</param>
/// <param name="cancellationToken">Cancellation token for graceful shutdown.</param>
/// <returns>Async enumerable of entities, streamed from source.</returns>
IAsyncEnumerable<TEntity> FetchAsync(
DateTime? minimumDt,
CancellationToken cancellationToken = default);
/// <summary>
/// Gets the entity type name for logging purposes.
/// </summary>
string EntityTypeName => typeof(TEntity).Name;
}