編集

次の方法で共有


SqlWorkflowPersistenceService Constructors

Definition

Initializes a new instance of the SqlWorkflowPersistenceService class.

Overloads

SqlWorkflowPersistenceService(NameValueCollection)

Initializes a new instance of the SqlWorkflowPersistenceService class by using the specified parameters.

SqlWorkflowPersistenceService(String)

Initializes a new instance of the SqlWorkflowPersistenceService class by using the database connection string.

SqlWorkflowPersistenceService(String, Boolean, TimeSpan, TimeSpan)

Initializes a new instance of the SqlWorkflowPersistenceService class using a database connection string and other parameters.

SqlWorkflowPersistenceService(NameValueCollection)

Initializes a new instance of the SqlWorkflowPersistenceService class by using the specified parameters.

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

parameters
NameValueCollection

A NameValueCollection that contains startup parameters.

Exceptions

parameters contains an invalid database connection string.

parameters is a null reference (Nothing in Visual Basic).

Remarks

This constructor is invoked when the workflow runtime engine loads services from an application configuration file. It can also be programmatically invoked with the NameValueCollection parameter. The valid parameters are ConnectionString, OwnershipTimeoutSeconds, UnloadOnIdle, and EnableRetries. An ArgumentException is thrown if parameters contain any other keys.

Applies to

SqlWorkflowPersistenceService(String)

Initializes a new instance of the SqlWorkflowPersistenceService class by using the database connection string.

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)

Parameters

connectionString
String

A valid database connection string.

Exceptions

connectionString is a null reference (Nothing in Visual Basic).

Applies to

SqlWorkflowPersistenceService(String, Boolean, TimeSpan, TimeSpan)

Initializes a new instance of the SqlWorkflowPersistenceService class using a database connection string and other parameters.

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)

Parameters

connectionString
String

A valid database connection string.

unloadOnIdle
Boolean

true to unload the workflow when it is in an idle state.

instanceOwnershipDuration
TimeSpan

The length of time that locks are maintained on idle workflows.

loadingInterval
TimeSpan

The frequency at which the persistence service polls the database for workflows with expired timers.

Exceptions

connectionString is a null reference (Nothing in Visual Basic).

Remarks

Note that using this constructor (which provides a value for instanceOwnershipDuration) enables locking. To create a persistence service that does not enable locking, use a different constructor that does not specify instanceOwnershipDuration.

Applies to