/// <inheritdoc /> public virtual Task <IAsyncCursor <TOutput> > MergeAsync <TOutput>(IMongoCollection <TOutput> outputCollection, MergeStageOptions <TOutput> mergeOptions = null, CancellationToken cancellationToken = default) { throw new NotImplementedException(); }
public override async Task <IAsyncCursor <TOutput> > MergeAsync <TOutput>(IMongoCollection <TOutput> outputCollection, MergeStageOptions <TOutput> mergeOptions = null, CancellationToken cancellationToken = default) { Ensure.IsNotNull(outputCollection, nameof(outputCollection)); mergeOptions = mergeOptions ?? new MergeStageOptions <TOutput>(); var aggregate = WithPipeline(_pipeline.Merge <TInput, TResult, TOutput>(outputCollection, mergeOptions)); return(await aggregate.ToCursorAsync(cancellationToken).ConfigureAwait(false)); }