WorkflowPersistenceService 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在衍生類別中實作時,初始化 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"))