DummyOrchestrationContext class

具有虛擬預設值的協調流程內容,可協助模擬/Stubbing Durable Functions API。

Extends

建構函式

DummyOrchestrationContext(string, string, LogHandler)

建立虛擬協調流程內容的新實例。 所有參數都是選擇性參數,但會公開以在測試程式中啟用彈性。

屬性

df

物件,包含所有 DF 協調流程 API 和屬性

繼承的屬性

extraInputs

用來取得次要輸入的物件

extraOutputs

用來設定次要輸出的物件

functionName

正在叫用的函式名稱

invocationId

這個調用特有的唯一 GUID

options

註冊函式時所使用的選項注意:這個值可能會與原始值稍有不同,因為它已經過驗證,而且預設值可能已明確新增

retryContext

如果已定義重試原則,則目前函式執行的重試內容

traceContext

啟用分散式追蹤案例的 TraceContext 資訊

triggerMetadata

如果元數據已在其他地方表示,則觸發程式的相關元數據或未定義。例如,HTTP 和定時器觸發程式不會定義此元數據,因為您可以改為找到要求的相關信息 & 定時器物件

繼承的方法

debug(any[])

在叫用期間記錄偵錯數據 (層級 1) 的建議方式。 類似於 Node.jsconsole.debug,但已與 Application Insights 等 Azure 功能整合

error(any[])

在叫用期間記錄錯誤數據(層級 4)的建議方式。 類似於 Node.jsconsole.error,但已與 Application Insights 等 Azure 功能整合

info(any[])

在叫用期間記錄信息數據 (層級 2) 的建議方式。 類似於 Node.jsconsole.info,但已與 Application Insights 等 Azure 功能整合

log(any[])

在叫用期間記錄數據的建議方式。 類似於 Node.js的 console.log,但已與 Application Insights 等 Azure 功能整合使用「資訊」記錄層級

trace(any[])

在叫用期間記錄追蹤數據 (層級 0) 的建議方式。 類似於 Node.jsconsole.trace,但已與 Application Insights 等 Azure 功能整合

warn(any[])

在叫用期間記錄警告數據 (層級 3) 的建議方式。 類似於 Node.jsconsole.warn,但已與 Application Insights 等 Azure 功能整合

建構函式詳細資料

DummyOrchestrationContext(string, string, LogHandler)

建立虛擬協調流程內容的新實例。 所有參數都是選擇性參數,但會公開以在測試程式中啟用彈性。

new DummyOrchestrationContext(functionName?: string, invocationId?: string, logHandler?: LogHandler)

參數

functionName

string

協調流程函式的名稱

invocationId

string

協調流程這個特定調用的標識碼

logHandler
LogHandler

發出來自協調流程函式之記錄的處理程式

屬性詳細資料

df

物件,包含所有 DF 協調流程 API 和屬性

df: DurableOrchestrationContext

屬性值

繼承的屬性詳細資料

extraInputs

用來取得次要輸入的物件

extraInputs: InvocationContextExtraInputs

屬性值

繼承自 InvocationContext.extraInputs

extraOutputs

用來設定次要輸出的物件

extraOutputs: InvocationContextExtraOutputs

屬性值

繼承自 InvocationContext.extraOutputs

functionName

正在叫用的函式名稱

functionName: string

屬性值

string

繼承自 InvocationContext.functionName

invocationId

這個調用特有的唯一 GUID

invocationId: string

屬性值

string

繼承自 InvocationContext.invocationId

options

註冊函式時所使用的選項注意:這個值可能會與原始值稍有不同,因為它已經過驗證,而且預設值可能已明確新增

options: EffectiveFunctionOptions

屬性值

繼承自 InvocationContext.options

retryContext

如果已定義重試原則,則目前函式執行的重試內容

retryContext?: RetryContext

屬性值

繼承自 InvocationContext.retryContext

traceContext

啟用分散式追蹤案例的 TraceContext 資訊

traceContext?: TraceContext

屬性值

繼承自 InvocationContext.traceContext

triggerMetadata

如果元數據已在其他地方表示,則觸發程式的相關元數據或未定義。例如,HTTP 和定時器觸發程式不會定義此元數據,因為您可以改為找到要求的相關信息 & 定時器物件

triggerMetadata?: TriggerMetadata

屬性值

繼承自 InvocationContext.triggerMetadata

繼承的方法的詳細資料

debug(any[])

在叫用期間記錄偵錯數據 (層級 1) 的建議方式。 類似於 Node.jsconsole.debug,但已與 Application Insights 等 Azure 功能整合

function debug(args: any[])

參數

args

any[]

繼承自 InvocationContext.debug

error(any[])

在叫用期間記錄錯誤數據(層級 4)的建議方式。 類似於 Node.jsconsole.error,但已與 Application Insights 等 Azure 功能整合

function error(args: any[])

參數

args

any[]

繼承自 InvocationContext.error

info(any[])

在叫用期間記錄信息數據 (層級 2) 的建議方式。 類似於 Node.jsconsole.info,但已與 Application Insights 等 Azure 功能整合

function info(args: any[])

參數

args

any[]

繼承自 InvocationContext.info 的

log(any[])

在叫用期間記錄數據的建議方式。 類似於 Node.js的 console.log,但已與 Application Insights 等 Azure 功能整合使用「資訊」記錄層級

function log(args: any[])

參數

args

any[]

繼承自 InvocationContext.log

trace(any[])

在叫用期間記錄追蹤數據 (層級 0) 的建議方式。 類似於 Node.jsconsole.trace,但已與 Application Insights 等 Azure 功能整合

function trace(args: any[])

參數

args

any[]

繼承自 InvocationContext.trace

warn(any[])

在叫用期間記錄警告數據 (層級 3) 的建議方式。 類似於 Node.jsconsole.warn,但已與 Application Insights 等 Azure 功能整合

function warn(args: any[])

參數

args

any[]

繼承自 InvocationContext.warn