AsyncEnumerableExtensionsAverageAsync(IAsyncEnumerableNullableBinarySize, CancellationToken) Method
Asynchronously computes the average of a sequence of nullable
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<Nullable<BinarySize>> AverageAsync(
IAsyncEnumerable<Nullable<BinarySize>>^ source,
CancellationToken cancellationToken = CancellationToken()
)
[<ExtensionAttribute>]
static member AverageAsync :
source : IAsyncEnumerable<Nullable<BinarySize>> *
?cancellationToken : CancellationToken
(* Defaults:
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask<Nullable<BinarySize>>
- source IAsyncEnumerableNullableBinarySize
-
A sequence of nullable BinarySize values to calculate the average of.
- cancellationToken CancellationToken (Optional)
-
The optional cancellation token to be used for canceling the sequence at any time.
ValueTaskNullableBinarySize
A task that represents the asynchronous operation. The result of the task is the average of
the values in the sequence, or
if
source is empty
or contains only values that are
.
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAsyncEnumerableNullableBinarySize. 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).