Share via


SqlWorkflowPersistenceService 构造函数

定义

初始化 SqlWorkflowPersistenceService 类的新实例。

重载

SqlWorkflowPersistenceService(NameValueCollection)

使用指定的参数初始化 SqlWorkflowPersistenceService 类的新实例。

SqlWorkflowPersistenceService(String)

使用数据库连接字符串初始化 SqlWorkflowPersistenceService 类的新实例。

SqlWorkflowPersistenceService(String, Boolean, TimeSpan, TimeSpan)

使用数据库连接字符串和其他参数初始化 SqlWorkflowPersistenceService 类的新实例。

SqlWorkflowPersistenceService(NameValueCollection)

使用指定的参数初始化 SqlWorkflowPersistenceService 类的新实例。

public:
 SqlWorkflowPersistenceService(System::Collections::Specialized::NameValueCollection ^ parameters);
public SqlWorkflowPersistenceService (System.Collections.Specialized.NameValueCollection parameters);
new System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService : System.Collections.Specialized.NameValueCollection -> System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService
Public Sub New (parameters As NameValueCollection)

参数

parameters
NameValueCollection

一个包含启动参数的 NameValueCollection

例外

parameters 包含无效的数据库连接字符串。

parameters 为空引用(在 Visual Basic 中为 Nothing)。

注解

当工作流运行时引擎从应用程序配置文件加载服务时,会调用此构造函数。 也可以使用 NameValueCollection 参数以编程的方式调用该构造函数。 有效参数为 ConnectionStringOwnershipTimeoutSecondsUnloadOnIdleEnableRetries。 如果参数包含其他任何键,则会引发 ArgumentException

适用于

SqlWorkflowPersistenceService(String)

使用数据库连接字符串初始化 SqlWorkflowPersistenceService 类的新实例。

public:
 SqlWorkflowPersistenceService(System::String ^ connectionString);
public SqlWorkflowPersistenceService (string connectionString);
new System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService : string -> System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService
Public Sub New (connectionString As String)

参数

connectionString
String

有效的数据库连接字符串。

例外

connectionString 为空引用(在 Visual Basic 中为 Nothing)。

适用于

SqlWorkflowPersistenceService(String, Boolean, TimeSpan, TimeSpan)

使用数据库连接字符串和其他参数初始化 SqlWorkflowPersistenceService 类的新实例。

public:
 SqlWorkflowPersistenceService(System::String ^ connectionString, bool unloadOnIdle, TimeSpan instanceOwnershipDuration, TimeSpan loadingInterval);
public SqlWorkflowPersistenceService (string connectionString, bool unloadOnIdle, TimeSpan instanceOwnershipDuration, TimeSpan loadingInterval);
new System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService : string * bool * TimeSpan * TimeSpan -> System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService
Public Sub New (connectionString As String, unloadOnIdle As Boolean, instanceOwnershipDuration As TimeSpan, loadingInterval As TimeSpan)

参数

connectionString
String

有效的数据库连接字符串。

unloadOnIdle
Boolean

true,则在工作流处于空闲状态时将其卸载。

instanceOwnershipDuration
TimeSpan

空闲工作流保持锁定的时间长度。

loadingInterval
TimeSpan

持久性服务轮询数据库以查找计时器已过期的工作流的频率。

例外

connectionString 为空引用(在 Visual Basic 中为 Nothing)。

注解

请注意,使用此构造函数(为 instanceOwnershipDuration 提供值)将启用锁定。 若要创建不会启用锁定的持久性服务,请使用另一个不会指定 instanceOwnershipDuration 的构造函数。

适用于