private QueryAdapter( AsyncQueryableOptions options, ImmutableDictionary <Type, IEnumerable> entries) : base(Microsoft.Extensions.Options.Options.Create(options)) { Debug.Assert(entries is not null); _entries = entries; }
public static async ValueTask <QueryAdapter> CreateAsync( AsyncQueryableOptions options, Func <ISeedHelper, CancellationToken, ValueTask> seed) { var entriesBuilder = new QueryAdapterEntriesBuilder(); await seed(entriesBuilder, CancellationToken.None).ConfigureAwait(false); var entries = entriesBuilder.GetEntries(); return(new QueryAdapter(options, entries)); }
protected override async ValueTask <QueryAdapterBase> GetQueryAdapterAsync( AsyncQueryableOptions options, Func <ISeedHelper, CancellationToken, ValueTask> seed) { return(await QueryAdapter.CreateAsync(options, seed)); }
private ValueTask <QueryAdapterBase> GetQueryAdapterAsync(AsyncQueryableOptions options) { return(GetQueryAdapterAsync(options, SeedAsync)); }
protected abstract ValueTask <QueryAdapterBase> GetQueryAdapterAsync( AsyncQueryableOptions options, Func <ISeedHelper, CancellationToken, ValueTask> seed);