Share via


SseParser<T>.EnumerateAsync(CancellationToken) Method

Definition

Gets an asynchronous enumerable of the server-sent events from this parser.

public System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<T>> EnumerateAsync (System.Threading.CancellationToken cancellationToken = default);
member this.EnumerateAsync : System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<'T>>
Public Function EnumerateAsync (Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of SseItem(Of T))

Parameters

cancellationToken
CancellationToken

The cancellation token to use to cancel the enumeration.

Returns

Exceptions

The parser has already been enumerated. Such an exception may propagate out of a call to MoveNextAsync().

The enumeration was canceled. Such an exception may propagate out of a call to MoveNextAsync().

Applies to