21.67. Class WatchEnumerable<TOutput, TInput>

Namespace: ArmoniK.Core.Adapters.MongoDB
Assembly: ArmoniK.Core.Adapters.MongoDB.dll

Class to convert a into a

public sealed class WatchEnumerable<TOutput, TInput> : IAsyncEnumerable<TOutput>

21.67.1. Type Parameters

TOutput

Output type

TInput

Input type

21.67.2. Inheritance

objectWatchEnumerable<TOutput, TInput>

21.67.3. Implements

IAsyncEnumerable<TOutput>

21.67.4. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

21.67.5. Constructors

21.67.5.1. WatchEnumerable(IChangeStreamCursor<TInput>, Func<TInput, TOutput>)

Initializes a from a with a conversion function to transform TInput into TOutput

public WatchEnumerable(IChangeStreamCursor<TInput> cursor, Func<TInput, TOutput> converter)

21.67.5.1.1. Parameters

cursor IChangeStreamCursor<TInput>

Input change stream cursor

converter Func<TInput, TOutput>

Func to convert the input into the output

21.67.6. Methods

21.67.6.1. GetAsyncEnumerator(CancellationToken)

Returns an enumerator that iterates asynchronously through the collection.

public IAsyncEnumerator<TOutput> GetAsyncEnumerator(CancellationToken cancellationToken = default)

21.67.6.1.1. Parameters

cancellationToken CancellationToken

A that may be used to cancel the asynchronous iteration.

21.67.6.1.2. Returns

IAsyncEnumerator<TOutput>

An enumerator that can be used to iterate asynchronously through the collection.