Method Share
View SourceShare<TSource>(IAsyncEnumerable<TSource>)
Creates a buffer with a shared view over the source sequence, causing each enumerator to fetch the next element from the source sequence.
Declaration
public static IAsyncBuffer<TSource> Share<TSource>(this IAsyncEnumerable<TSource> source)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | Source sequence. |
Returns
Type | Description |
---|---|
IAsyncBuffer<TSource> | Buffer enabling each enumerator to retrieve elements from the shared source sequence. |
Type Parameters
Name | Description |
---|---|
TSource | Source sequence element type. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|