feat(core): add shared auth models for encrypted login
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using JdeScoping.DataSync.Contracts;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace JdeScoping.DataSync.Fetchers;
|
||||
|
||||
/// <summary>
|
||||
/// Base class for mock data fetchers used during development.
|
||||
/// Returns empty results - real implementations will query source databases.
|
||||
/// </summary>
|
||||
/// <typeparam name="TEntity">The entity type being fetched.</typeparam>
|
||||
public abstract class MockDataFetcher<TEntity> : IDataFetcher<TEntity> where TEntity : class
|
||||
{
|
||||
/// <summary>
|
||||
/// Logger instance.
|
||||
/// </summary>
|
||||
protected readonly ILogger Logger;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MockDataFetcher{TEntity}"/> class.
|
||||
/// </summary>
|
||||
protected MockDataFetcher(ILogger logger)
|
||||
{
|
||||
Logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public virtual async IAsyncEnumerable<TEntity> FetchAsync(
|
||||
DateTime? minimumDt,
|
||||
[EnumeratorCancellation] CancellationToken cancellationToken = default)
|
||||
{
|
||||
Logger.LogWarning(
|
||||
"MockDataFetcher<{EntityType}> returning empty results. Implement real fetcher for production.",
|
||||
typeof(TEntity).Name);
|
||||
|
||||
// Return empty enumerable - real implementations will query source databases
|
||||
await Task.CompletedTask;
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user