MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Caching.​Aspects.​HelpersAsync­Enumerable­Helper
Open sandboxFocus

AsyncEnumerableHelper Class

Helper methods related to System.Collections.Generic.IAsyncEnumerable<> and System.Collections.Generic.IAsyncEnumerator<>.

Inheritance
System.Object
AsyncEnumerableHelper
Namespace: Metalama.Patterns.Caching.Aspects.Helpers
Assembly: Metalama.Patterns.Caching.Aspects.dll
Syntax
public static class AsyncEnumerableHelper : Object
Remarks

This class is used by code generated by caching framework aspects.

Methods

Name Description
AsAsyncEnumerable<T>(Task<IAsyncEnumerable<T>>)

If task is already completed, returns the result of the task; otherwise, returns an instance of System.Collections.Generic.IAsyncEnumerable<> which awaits the task in MoveNextAsync() then creates and delegates to an enumerator from the result of the task.

AsAsyncEnumerable<T>(ValueTask<IAsyncEnumerable<T>>)

If task is already completed, returns the result of the task; otherwise, returns an instance of System.Collections.Generic.IAsyncEnumerable<> which awaits the task in MoveNextAsync() then creates and delegates to an enumerator from the result of the task.

AsAsyncEnumerator<T>(Task<IAsyncEnumerator<T>>)

If task is already completed, returns the result of the task; otherwise, returns an instance of System.Collections.Generic.IAsyncEnumerator<> which awaits the task in MoveNextAsync() then delegates to the enumerator from the result of the task.

AsAsyncEnumerator<T>(ValueTask<IAsyncEnumerator<T>>)

If task is already completed, returns the result of the task; otherwise, returns an instance of System.Collections.Generic.IAsyncEnumerator<> which awaits the task in MoveNextAsync() then delegates to the enumerator from the result of the task.