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

适用于