AsyncEnumerableExtensionsAverageAsync(IAsyncEnumerableBinarySize, CancellationToken) Method
Asynchronously computes the average of a sequence of
BinarySize values.
Namespace: OokiiAssembly: Ookii.BinarySize.Async (in Ookii.BinarySize.Async.dll) Version: 1.1.0+e86ae44c345422a1011f7fa7b6b715bf3d1a34ce
public static ValueTask<BinarySize> AverageAsync(
this IAsyncEnumerable<BinarySize> source,
CancellationToken cancellationToken = default
)
<ExtensionAttribute>
Public Shared Function AverageAsync (
source As IAsyncEnumerable(Of BinarySize),
Optional cancellationToken As CancellationToken = Nothing
) As ValueTask(Of BinarySize)
public:
[ExtensionAttribute]
static ValueTask<BinarySize> AverageAsync(
IAsyncEnumerable<BinarySize>^ source,
CancellationToken cancellationToken = CancellationToken()
)
[<ExtensionAttribute>]
static member AverageAsync :
source : IAsyncEnumerable<BinarySize> *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<BinarySize>
- source IAsyncEnumerableBinarySize
-
A sequence of BinarySize values to calculate the average of.
- cancellationToken CancellationToken (Optional)
-
The optional cancellation token to be used for canceling the sequence at any time.
ValueTaskBinarySize
A task that represents the asynchronous operation. The result of the task is the average of the
values in the sequence.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAsyncEnumerableBinarySize. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).