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"))

适用于