Show / Hide Table of Contents

Class AsyncEnumerableExtensions

Extensions for all items of type IAsyncEnumerable<T>.

Inheritance
object
AsyncEnumerableExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types.Extensions
Assembly: MCART.dll
Syntax
public static class AsyncEnumerableExtensions

Methods

| Edit this page View Source

CountAsync<T>(IAsyncEnumerable<T>)

Gets the count of items from an IAsyncEnumerable<T>, enumerating it asynchronously.

Declaration
public static ValueTask<int> CountAsync<T>(this IAsyncEnumerable<T> e)
Parameters
Type Name Description
IAsyncEnumerable<T> e

IAsyncEnumerable<T> for which to get the count of items.

Returns
Type Description
ValueTask<int>

The number of items contained in the collection.

Type Parameters
Name Description
T

Type of items in the collection.

Exceptions
Type Condition
TaskCanceledException

Occurs when the task is cancelled.

| Edit this page View Source

CountAsync<T>(IAsyncEnumerable<T>, CancellationToken)

Gets the count of items from an IAsyncEnumerable<T>, enumerating it asynchronously.

Declaration
public static ValueTask<int> CountAsync<T>(this IAsyncEnumerable<T> e, CancellationToken ct)
Parameters
Type Name Description
IAsyncEnumerable<T> e

IAsyncEnumerable<T> for which to get the count of items.

CancellationToken ct

Token that allows cancellation of the operation.

Returns
Type Description
ValueTask<int>

The number of items contained in the collection.

Type Parameters
Name Description
T

Type of items in the collection.

Exceptions
Type Condition
TaskCanceledException

Occurs when the task is cancelled.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX