using System.Collections.Immutable;
using System.Runtime.CompilerServices;
using System.Text.Json.Nodes;
namespace StellaOps.Graph.Indexer.Incremental;
///
/// No-op change/backfill source used when no external change feed is configured.
///
public sealed class NoOpGraphChangeEventSource : IGraphChangeEventSource, IGraphBackfillSource
{
public IAsyncEnumerable ReadAsync(CancellationToken cancellationToken) =>
ReadInternalAsync(cancellationToken);
public IAsyncEnumerable ReadBackfillAsync(CancellationToken cancellationToken) =>
ReadInternalAsync(cancellationToken);
private static async IAsyncEnumerable ReadInternalAsync([EnumeratorCancellation] CancellationToken cancellationToken)
{
await Task.CompletedTask.ConfigureAwait(false);
yield break;
}
}