Method AssertCount
View SourceAssertCount<TSource>(IAsyncEnumerable<TSource>, int)
Asserts that a source sequence contains a given count of elements.
Declaration
public static IAsyncEnumerable<TSource> AssertCount<TSource>(this IAsyncEnumerable<TSource> source, int count)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
int | count | Count to assert. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | Returns the original sequence as long it is contains the number of elements specified by |
Type Parameters
Name | Description |
---|---|
TSource | Type of elements in |
Remarks
This operator uses deferred execution and streams its results.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
ArgumentOutOfRangeException |
|
ArgumentException |
|