SqlWorkflowPersistenceService 建構函式

定義

初始化 SqlWorkflowPersistenceService 類別的新執行個體。

多載

名稱 Description
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 包含一個無效的資料庫連接字串。

是一個空參考()。

備註

當工作流程執行引擎從應用程式設定檔載入服務時,會呼叫此建構子。 它也可以用 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

一個有效的資料庫 連接字串。

例外狀況

是一個空參考()。

適用於

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

持久化服務查詢資料庫中計時器過期工作流程的頻率。

例外狀況

是一個空參考()。

備註

請注意,使用此建構子(提供 的 instanceOwnershipDuration值)可實現鎖定。 若要建立不啟用鎖定的持久化服務,請使用不指定 instanceOwnershipDuration的另一種構造子。

適用於