我正在使用V4 bot框架,并且在识别特定意图时,我想将流程转发到特定类。
在V3中,正向(从当前类调用className)是使用:
await context.Forward(new className(), ResumeControlAfterClass, context.Activity, CancellationToken.None);
...
...
private async Task ResumeControlAfterClass(IDialogContext context, IAwaitable<object> result)
{
context.Wait(MessageReceived);
}
v4对应的api是:
return await stepContext.ReplaceDialogAsync(
nameof(WaterfallDialog),
cancellationToken: cancellationToken);
我正在尝试以下方法:
await stepContext.ReplaceDialogAsync(nameof(className), list, cancellationToken);
但是,它不起作用,而且我也不确定参数中的列表。
请帮助。