TaskStream.Subscribe(String, 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.
Subscribes to events for this task input.
public virtual System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<string>> Subscribe(string? afterEventId = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Subscribe : string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<string>>
override this.Subscribe : string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<string>>
Public Overridable Function Subscribe (Optional afterEventId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of SseItem(Of String))
Parameters
- afterEventId
- String
The event id after which replay begins, or null.
- cancellationToken
- CancellationToken
A token to stop iteration.
Returns
An asynchronous sequence of event items.