SseParser<T>.EnumerateAsync(CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.