21.65. Class WatchEnumerator<TOutput, TInput>

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

Class to convert a into a

public sealed class WatchEnumerator<TOutput, TInput> : IAsyncEnumerator<TOutput>, IAsyncDisposable

21.65.1. Type Parameters

TOutput

Output type

TInput

Input type

21.65.2. Inheritance

objectWatchEnumerator<TOutput, TInput>

21.65.3. Implements

IAsyncEnumerator<TOutput>, IAsyncDisposable

21.65.4. Inherited Members

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

21.65.5. Constructors

21.65.5.1. WatchEnumerator(IChangeStreamCursor<TInput>, Func<TInput, TOutput>, CancellationToken)

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

public WatchEnumerator(IChangeStreamCursor<TInput> cursor, Func<TInput, TOutput> converter, CancellationToken cancellationToken)

21.65.5.1.1. Parameters

cursor IChangeStreamCursor<TInput>

Input change stream cursor

converter Func<TInput, TOutput>

Func to convert the input into the output

cancellationToken CancellationToken

Token used to cancel the execution of the method

21.65.6. Properties

21.65.6.1. Current

Gets the element in the collection at the current position of the enumerator.

public TOutput Current { get; }

21.65.6.1.1. Property Value

TOutput

21.65.7. Methods

21.65.7.1. DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

21.65.7.1.1. Returns

ValueTask

A task that represents the asynchronous dispose operation.

21.65.7.2. MoveNextAsync()

Advances the enumerator asynchronously to the next element of the collection.

public ValueTask<bool> MoveNextAsync()

21.65.7.2.1. Returns

ValueTask<bool>

A that will complete with a result of true if the enumerator was successfully advanced to the next element, or false if the enumerator has passed the end of the collection.