共用方式為


WorkflowPersistenceService 建構函式

定義

在衍生類別中實作時,初始化 WorkflowPersistenceService 類別的新執行個體。

protected:
 WorkflowPersistenceService();
protected WorkflowPersistenceService ();
Protected Sub New ()

範例

下列範例示範建立 SqlWorkflowPersistenceService 類別 (衍生自 WorkflowPersistenceService) 的執行個體。 這個範例來自 Program.cs 類別中的<巢狀例外處理常式 SDK>範例。 如需詳細資訊,請參閱 巢狀例外狀況處理常式範例

// A workflow is always run asychronously; the main thread waits on this event so the program
// doesn't exit before the workflow completes
workflowRuntime.AddService(new SqlWorkflowPersistenceService("Initial Catalog=SqlPersistenceService;Data Source=localhost;Integrated Security=SSPI;"));
' A workflow is always run asychronously the main thread waits on Me event so the program
' doesn't exit before the workflow completes
WorkflowRuntime.AddService(New SqlWorkflowPersistenceService("Initial Catalog=SqlPersistenceServiceData Source=localhostIntegrated Security=SSPI"))

適用於