DialogExtensions.RunAsync(Dialog, ITurnContext, IStatePropertyAccessor<DialogState>, CancellationToken) Method

Definition

Creates a dialog stack and starts a dialog, pushing it onto the stack.

public static System.Threading.Tasks.Task RunAsync (this Microsoft.Bot.Builder.Dialogs.Dialog dialog, Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.IStatePropertyAccessor<Microsoft.Bot.Builder.Dialogs.DialogState> accessor, System.Threading.CancellationToken cancellationToken);
static member RunAsync : Microsoft.Bot.Builder.Dialogs.Dialog * Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.IStatePropertyAccessor<Microsoft.Bot.Builder.Dialogs.DialogState> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function RunAsync (dialog As Dialog, turnContext As ITurnContext, accessor As IStatePropertyAccessor(Of DialogState), cancellationToken As CancellationToken) As Task

Parameters

dialog
Dialog

The dialog to start.

turnContext
ITurnContext

The context for the current turn of the conversation.

accessor
IStatePropertyAccessor<DialogState>

The IStatePropertyAccessor<T> accessor with which to manage the state of the dialog stack.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

A Task representing the asynchronous operation.

Applies to