Method Publish
Publish<TSource>(IAsyncEnumerable<TSource>)
Creates a buffer with a view over the source sequence, causing each enumerator to obtain access to the remainder of the sequence from the current index in the buffer.
Declaration
public static IAsyncBuffer<TSource> Publish<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, starting from the index at the point of obtaining the enumerator. |
Type Parameters
| Name | Description |
|---|---|
| TSource | Source sequence element type. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|