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

包含启动参数的 A NameValueCollection

例外

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

parameters是空引用(Visual Basic 中的 Nothing)。

注解

当工作流运行时引擎从应用程序配置文件加载服务时,将调用此构造函数。 还可以使用参数以编程方式调用 NameValueCollection 它。 有效参数为 ConnectionStringOwnershipTimeoutSecondsUnloadOnIdleEnableRetries。 如果参数包含任何其他键,则会引发 an 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的其他构造函数。

适用于