Share via


Extensions.Forward<R> Method

Definition

Call a child dialog, add it to the top of the stack and post the message to the child dialog.

public static System.Threading.Tasks.Task Forward<R> (this Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack stack, Microsoft.Bot.Builder.Dialogs.IDialog<R> child, Microsoft.Bot.Builder.Dialogs.ResumeAfter<R> resume, Microsoft.Bot.Connector.IMessageActivity message, System.Threading.CancellationToken token = default);
static member Forward : Microsoft.Bot.Builder.Dialogs.Internals.IDialogStack * Microsoft.Bot.Builder.Dialogs.IDialog<'R> * Microsoft.Bot.Builder.Dialogs.ResumeAfter<'R> * Microsoft.Bot.Connector.IMessageActivity * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function Forward(Of R) (stack As IDialogStack, child As IDialog(Of R), resume As ResumeAfter(Of R), message As IMessageActivity, Optional token As CancellationToken = Nothing) As Task

Type Parameters

R

The type of result expected from the child dialog.

Parameters

stack
IDialogStack

The dialog stack.

child
IDialog<R>

The child dialog.

resume
ResumeAfter<R>

The method to resume when the child dialog has completed.

message
IMessageActivity

The message that will be posted to child dialog.

token
CancellationToken

A cancellation token.

Returns

A task representing the Forward operation.

Applies to