Show / Hide Table of Contents

Class AsyncEnumerableExtensions

An extension class for squashing System.Collections.Generic.IAsyncEnumerable<T>.

Inheritance
System.Object
AsyncEnumerableExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public static class AsyncEnumerableExtensions
Remarks

This set of extension methods will squash an System.Collections.Generic.IAsyncEnumerable<T> into a single System.Collections.Generic.IEnumerable<T>. This is often associated with requests that has a set limit when requesting.

Methods

| Improve this Doc View Source

Flatten<T>(IAsyncEnumerable<IEnumerable<T>>)

Flattens the specified pages into one System.Collections.Generic.IAsyncEnumerable<T>.

Declaration
public static IAsyncEnumerable<T> Flatten<T>(this IAsyncEnumerable<IEnumerable<T>> source)
Parameters
Type Name Description
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IEnumerable<T>> source
Returns
Type Description
System.Collections.Generic.IAsyncEnumerable<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

FlattenAsync<T>(IAsyncEnumerable<IEnumerable<T>>)

Flattens the specified pages into one System.Collections.Generic.IEnumerable<T> asynchronously.

Declaration
public static Task<IEnumerable<T>> FlattenAsync<T>(this IAsyncEnumerable<IEnumerable<T>> source)
Parameters
Type Name Description
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IEnumerable<T>> source
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<T>>
Type Parameters
Name Description
T
  • Improve this Doc
  • View Source
Back to top Generated by DocFX