Language

TaskStream.Subscribe(String, CancellationToken) Method

Definition

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.

Applies to