据此我认为现在可以从子对话框调用父对话框。之前我不能这样做,因为它会导致堆栈溢出异常。我已经更新到 SDK 4.3 有谁知道如何实施这些更改吗?
主对话框调用对话框 A。
WaterfallStep[] waterfallSteps = new WaterfallStep[]
{
FirstStepAsync,
SecondStepAsync,
ThirdStepAsync,
};
AddDialog(new WaterfallDialog(InitialId, waterfallSteps));
AddDialog(new DialogA(DialogAId));
return await stepContext.BeginDialogAsync(DialogAId, cancellationToken: cancellationToken);
Dialog A 调用 Dialog Achild
WaterfallStep[] waterfallSteps = new WaterfallStep[]
{
FirstStepAsync,
SecondStepAsync,
ThirdStepAsync,
};
AddDialog(new WaterfallDialog(InitialId, waterfallSteps));
AddDialog(new DialogAchild(DialogAchildId));
return await stepContext.BeginDialogAsync(DialogAchildId, cancellationToken: cancellationToken);
Dialog Achild 调用MainDialog,但这会产生Stack 溢出异常。
WaterfallStep[] waterfallSteps = new WaterfallStep[]
{
FirstStepAsync,
SecondStepAsync,
ThirdStepAsync,
};
AddDialog(new WaterfallDialog(InitialId, waterfallSteps));
AddDialog(new MainDialog(MainDialogId));
return await stepContext.BeginDialogAsync(MainDialogId, cancellationToken: cancellationToken);
茅侃侃
相关分类