TaskStreamWriter.EmitAsync(SseItem<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.
Publishes one event to this task input's stream.
public virtual System.Threading.Tasks.ValueTask EmitAsync(System.Net.ServerSentEvents.SseItem<string> item, System.Threading.CancellationToken cancellationToken = default);
abstract member EmitAsync : System.Net.ServerSentEvents.SseItem<string> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
override this.EmitAsync : System.Net.ServerSentEvents.SseItem<string> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Overridable Function EmitAsync (item As SseItem(Of String), Optional cancellationToken As CancellationToken = Nothing) As ValueTask
Parameters
- cancellationToken
- CancellationToken
A token to cancel the operation.
Returns
A task that completes when the event has been published.