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 為 null 參考 (在 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 為 null 參考 (在 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 為 null 參考 (在 Visual Basic 中為 Nothing)。

備註

請注意,若使用此建構函式 (它會提供 instanceOwnershipDuration 的值),就會啟用鎖定。 若要建立不啟用鎖定的持續性服務,請使用不會指定 instanceOwnershipDuration 的不同建構函式。

適用於