DialogSet.CreateContextAsync(ITurnContext, 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.
Creates a DialogContext which can be used to work with the dialogs in the DialogSet.
public System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogContext> CreateContextAsync (Microsoft.Bot.Builder.ITurnContext turnContext, System.Threading.CancellationToken cancellationToken = default);
member this.CreateContextAsync : Microsoft.Bot.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.Dialogs.DialogContext>
Public Function CreateContextAsync (turnContext As ITurnContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DialogContext)
Parameters
- turnContext
- ITurnContext
Context for the current turn of conversation with the user.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
A Task representing the asynchronous operation.
Remarks
If the task is successful, the result contains the created DialogContext.