EventFactory class

包含用于创建各种事件类型的实用工具方法。

方法

createHandoffInitiation<T>(TurnContext, T, Transcript)

创建移交启动事件。

createHandoffStatus(ConversationAccount, string, string)

创建移交状态事件。

方法详细信息

createHandoffInitiation<T>(TurnContext, T, Transcript)

创建移交启动事件。

static function createHandoffInitiation<T>(context: TurnContext, handoffContext: T, transcript?: Transcript): Activity

参数

context

TurnContext

轮次的上下文对象。

handoffContext

T

代理中心特定的上下文。

transcript

Transcript

对话的脚本。

返回

Activity

移交事件活动。

createHandoffStatus(ConversationAccount, string, string)

创建移交状态事件。

static function createHandoffStatus(conversation: ConversationAccount, state: string, message?: string): Activity

参数

conversation

ConversationAccount

正在移交的对话。

state

string

状态,可能的值是:“accepted”、“failed”、“completed”。

message

string

有关失败移交的其他消息。

返回

Activity

移交事件活动。