23.59. 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>

23.59.1. Type Parameters

TOutput

Output type

TInput

Input type

23.59.2. Inheritance

objectWatchEnumerable<TOutput, TInput>

23.59.3. Implements

IAsyncEnumerable<TOutput>

23.59.4. Inherited Members

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

23.59.5. Constructors

23.59.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)

23.59.5.1.1. Parameters

cursor IChangeStreamCursor<TInput>

Input change stream cursor

converter Func<TInput, TOutput>

Func to convert the input into the output

23.59.6. Methods

23.59.6.1. GetAsyncEnumerator(CancellationToken)

Returns an enumerator that iterates asynchronously through the collection.

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

23.59.6.1.1. Parameters

cancellationToken CancellationToken

A that may be used to cancel the asynchronous iteration.

23.59.6.1.2. Returns

IAsyncEnumerator<TOutput>

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