Class AsyncEnumerableExtensions
- Namespace
- Discord
- Assembly
- Discord.Net.Core.dll
An extension class for squashing IAsyncEnumerable<T>.
public static class AsyncEnumerableExtensions
- Inheritance
-
AsyncEnumerableExtensions
- Inherited Members
Remarks
This set of extension methods will squash an IAsyncEnumerable<T> into a single IEnumerable<T>. This is often associated with requests that has a set limit when requesting.
Methods
FlattenAsync<T>(IAsyncEnumerable<IEnumerable<T>>)
Flattens the specified pages into one IEnumerable<T> asynchronously.
public static Task<IEnumerable<T>> FlattenAsync<T>(this IAsyncEnumerable<IEnumerable<T>> source)
Parameters
source
IAsyncEnumerable<IEnumerable<T>>
Returns
- Task<IEnumerable<T>>
Type Parameters
T
Flatten<T>(IAsyncEnumerable<IEnumerable<T>>)
Flattens the specified pages into one IAsyncEnumerable<T>.
public static IAsyncEnumerable<T> Flatten<T>(this IAsyncEnumerable<IEnumerable<T>> source)
Parameters
source
IAsyncEnumerable<IEnumerable<T>>
Returns
Type Parameters
T