共用方式為


WorkflowSchedulerService 建構函式

定義

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

protected:
 WorkflowSchedulerService();
protected WorkflowSchedulerService ();
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"))

適用於