语言

ActionScope 类

定义

ActionScope 管理执行一组动作,并支持 Goto、Continue 和 Break 语义。

public class ActionScope : Microsoft.Bot.Builder.Dialogs.Dialog, Microsoft.Bot.Builder.Dialogs.IDialogDependencies
type ActionScope = class
    inherit Dialog
    interface IDialogDependencies
Public Class ActionScope
Inherits Dialog
Implements IDialogDependencies
继承
ActionScope
派生
实现

构造函数

名称 说明
ActionScope(IEnumerable<Dialog>)

初始化 ActionScope 类的新实例。

字段

名称 说明
OFFSETKEY

定义偏移键的路径。

属性

名称 说明
Actions

执行或执行动作。

Id

为对话设置或设置id。

(继承自 Dialog)
Source

获取cref=“SourceRange”/>的信息。

(继承自 Dialog)
TelemetryClient

获取或设置用于日志的使用 IBotTelemetryClient 。

(继承自 Dialog)

方法

名称 说明
BeginActionAsync(DialogContext, Int32, CancellationToken)

启动一个新对话并将其推送到对话堆栈。

BeginDialogAsync(DialogContext, Object, CancellationToken)

启动对话并将其推送到对话堆栈时调用。

ContinueDialogAsync(DialogContext, CancellationToken)

当对话 继续时调用,当前是活跃对话,用户回复新的活动。

EndDialogAsync(ITurnContext, DialogInstance, DialogReason, CancellationToken)

对话框结束时调用。

(继承自 Dialog)
GetDependencies()

枚举子对话框依赖,以便将它们添加到容器对话框集中。

GetVersion()

获得一个唯一字符串,代表该对话的版本。 如果对话框系统之间的版本更改将发出 DialogChanged 事件。

OnActionScopeResultAsync(DialogContext, ActionScopeResult, CancellationToken)

当返回控制到该对话时调用了。ActionScopeResult

OnBreakLoopAsync(DialogContext, ActionScopeResult, CancellationToken)

在返回控制到该对话框 ActionScopeResult 时调用,并将 ActionCommand 属性设置为 BreakLoop。

OnComputeId()

构建对话的计算ID。

OnContinueLoopAsync(DialogContext, ActionScopeResult, CancellationToken)

在返回控制到该对话框 ActionScopeResult 时调用,并将 ActionCommand 属性设置为 ContinueLoop。

OnDialogEventAsync(DialogContext, DialogEvent, CancellationToken)

当事件被触发时调用,使用 DialogContext.emitEvent()当前对话或当前对话开始的对话。

(继承自 Dialog)
OnEndOfActionsAsync(DialogContext, Object, CancellationToken)

当对话动作结束时调用。

OnGotoActionAsync(DialogContext, ActionScopeResult, CancellationToken)

在返回控制到该对话框 ActionScopeResult 时调用,并将 ActionCommand 属性设置为 GoToAction。

OnNextActionAsync(DialogContext, Object, CancellationToken)

当对话继续到下一个动作时调用。

OnPostBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

在向所有家长冒泡事件后调用,但未处理。

(继承自 Dialog)
OnPreBubbleEventAsync(DialogContext, DialogEvent, CancellationToken)

在将事件气泡到其父级之前调用。

(继承自 Dialog)
RegisterSourceLocation(String, Int32)

在指定位置注册 cref=“SourceRange”/> 。

(继承自 Dialog)
RepromptDialogAsync(ITurnContext, DialogInstance, CancellationToken)

当对话框应重新提示用户输入时调用。

(继承自 Dialog)
ResumeDialogAsync(DialogContext, DialogReason, Object, CancellationToken)

当子对话结束回合时调用,将控制权还给该对话。

扩展方法

名称 说明
RunAsync(Dialog, ITurnContext, IStatePropertyAccessor<DialogState>, CancellationToken)

创建对话堆栈并启动对话,将其推送到堆栈上。

适用于