共用方式為


OnIntent class

收到活動時所觸發的動作,且已辨識的意圖和實體符合指定的意圖和實體篩選清單。

Extends

建構函式

OnIntent(string, string[], Dialog[], string)

建立新的 OnIntent 實例。

屬性

$kind
entities

取得或設定必須辨識此規則才能觸發的實體。

intent

取得或設定要比對的意圖。

繼承的屬性

actions

取得或設定符合規則條件約束時要新增至計劃的動作。

condition

取得或設定需要符合才能執行之動作的條件(選擇性)。

event

取得或設定要引發的事件。

id

條件的標識碼。

priority

取得或設定規則優先順序表示式,其中0是最高,且忽略小於0。

runOnce

值,指出規則是否應該只針對每一組唯一的記憶體路徑執行一次。

繼承的方法

addExternalCondition(string)

將外部條件新增至 OnCondition

configure(Record<string, unknown>)

用於設定物件的 Fluent 方法。

currentPriority(ActionContext)

計算優先順序表達式的目前值,並傳回它。

execute(ActionContext)

呼叫以執行條件動作的方法。

getConverter(Object)
getDependencies()

取得子對話相依性,以便將其新增至容器對話框集。

getExpression()

取得此條件的快取表達式。

建構函式詳細資料

OnIntent(string, string[], Dialog[], string)

建立新的 OnIntent 實例。

new OnIntent(intent?: string, entities?: string[], actions?: Dialog[], condition?: string)

參數

intent

string

(選擇性)要比對的意圖。

entities

string[]

(選擇性)必須辨識此規則才能觸發的實體。

actions

Dialog[]

(選擇性)符合規則條件約束時要新增至計劃的動作。

condition

string

(選擇性)需要符合才能執行動作的條件。

屬性詳細資料

$kind

static $kind: string

屬性值

string

entities

取得或設定必須辨識此規則才能觸發的實體。

entities: string[]

屬性值

string[]

intent

取得或設定要比對的意圖。

intent: string

屬性值

string

繼承的屬性詳細資料

actions

取得或設定符合規則條件約束時要新增至計劃的動作。

actions: Dialog[]

屬性值

Dialog[]

繼承自OnCondition.actions

condition

取得或設定需要符合才能執行之動作的條件(選擇性)。

condition: BoolExpression

屬性值

BoolExpression

繼承自OnCondition.condition

event

取得或設定要引發的事件。

event: string

屬性值

string

繼承自OnDialogEvent.event

id

條件的標識碼。

id: string

屬性值

string

繼承自OnCondition.id

priority

取得或設定規則優先順序表示式,其中0是最高,且忽略小於0。

priority: NumberExpression

屬性值

NumberExpression

繼承自OnCondition.priority

runOnce

值,指出規則是否應該只針對每一組唯一的記憶體路徑執行一次。

runOnce: boolean

屬性值

boolean

繼承自OnCondition.runOnce

繼承的方法的詳細資料

addExternalCondition(string)

將外部條件新增至 OnCondition

function addExternalCondition(condition: string)

參數

condition

string

要新增的外部條件約束,將會是 AND'ed 至所有其他條件約束。

繼承自OnCondition.addExternalCondition

configure(Record<string, unknown>)

用於設定物件的 Fluent 方法。

function configure(config: Record<string, unknown>): this

參數

config

Record<string, unknown>

要套用的組態設定。

傳回

this

作業完成之後 可設定

繼承自 Configure.configure

currentPriority(ActionContext)

計算優先順序表達式的目前值,並傳回它。

function currentPriority(actionContext: ActionContext): number

參數

actionContext
ActionContext

要用於評估的內容。

傳回

number

計算優先順序。

繼承自OnCondition.currentPriority

execute(ActionContext)

呼叫以執行條件動作的方法。

function execute(actionContext: ActionContext): Promise<ActionChangeList[]>

參數

actionContext
ActionContext

上下文。

傳回

Promise<ActionChangeList[]>

具有計劃變更清單的承諾。

繼承自OnCondition.execute

getConverter(Object)

function getConverter(property: Object): Converter | ConverterFactory

參數

property

Object

條件式選取器組態的索引鍵。

傳回

Converter | ConverterFactory

選取器組態的轉換器。

繼承自OnCondition.getConverter

getDependencies()

取得子對話相依性,以便將其新增至容器對話框集。

function getDependencies(): Dialog[]

傳回

Dialog[]

對話框清單

繼承自OnCondition.getDependencies

getExpression()

取得此條件的快取表達式。

function getExpression(): Expression

傳回

Expression

用來評估此條件的快取表達式。

繼承自OnCondition.getExpression