DialogContext.EmitEventAsync(String, Object, Boolean, Boolean, CancellationToken) Method

Definition

Searches for a dialog with a given ID. Emits a named event for the current dialog, or someone who started it, to handle.

public System.Threading.Tasks.Task<bool> EmitEventAsync (string name, object value = default, bool bubble = true, bool fromLeaf = false, System.Threading.CancellationToken cancellationToken = default);
member this.EmitEventAsync : string * obj * bool * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function EmitEventAsync (name As String, Optional value As Object = Nothing, Optional bubble As Boolean = true, Optional fromLeaf As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

name
String

Name of the event to raise.

value
Object

Value to send along with the event.

bubble
Boolean

Flag to control whether the event should be bubbled to its parent if not handled locally. Defaults to a value of true.

fromLeaf
Boolean

Whether the event is emitted from a leaf node.

cancellationToken
CancellationToken

The cancellation token.

Returns

Task<Boolean>

True if the event was handled.

Applies to