SqlTrackingService 构造函数
定义
初始化 SqlTrackingService 类的新实例。Initializes a new instance of the SqlTrackingService class.
重载
| SqlTrackingService(NameValueCollection) |
使用指定的 SqlTrackingService 初始化 NameValueCollection 类的新实例。Initializes a new instance of the SqlTrackingService class by using the specified NameValueCollection. |
| SqlTrackingService(String) |
使用指定的数据库连接字符串来初始化 SqlTrackingService 类的新实例。Initializes a new instance of the SqlTrackingService class by using the specified database connection string. |
SqlTrackingService(NameValueCollection)
使用指定的 SqlTrackingService 初始化 NameValueCollection 类的新实例。Initializes a new instance of the SqlTrackingService class by using the specified NameValueCollection.
public:
SqlTrackingService(System::Collections::Specialized::NameValueCollection ^ parameters);
public SqlTrackingService (System.Collections.Specialized.NameValueCollection parameters);
new System.Workflow.Runtime.Tracking.SqlTrackingService : System.Collections.Specialized.NameValueCollection -> System.Workflow.Runtime.Tracking.SqlTrackingService
Public Sub New (parameters As NameValueCollection)
参数
- parameters
- NameValueCollection
一个 NameValueCollection,它指定 SqlTrackingService 的属性及这些属性的初始值。A NameValueCollection that specifies properties of SqlTrackingService and their initial values.
例外
parameters 为空引用(在 Visual Basic 中为 Nothing)。parameters is a null reference (Nothing in Visual Basic).
与 string 中的 Boolean 属性值关联的 parameters 值不是由 TrueString 或 FalseString 表示的。The string value associated with a Boolean property key in parameters is not represented by either TrueString or FalseString.
注解
在从指定 SqlTrackingService 的应用程序配置文件中初始化工作流运行时引擎时,工作流运行时引擎将调用此构造函数。This constructor is called by the workflow runtime engine when the workflow runtime engine is initialized from an application configuration file that specifies a SqlTrackingService. 也可以使用此构造函数从宿主应用程序中初始化 SqlTrackingService。You can also use this constructor to initialize the SqlTrackingService from a host application. 将依据 SqlTrackingService 中包含的键值对来初始化 NameValueCollection。The SqlTrackingService is initialized according to the key-value pairs that are contained in the NameValueCollection. 下表枚举了可能的键、每个值初始化的属性,以及每个属性的类型。The following table enumerates the potential keys, the property which each value initializes, and the type of each property. 与每个键关联的值应该是表示该键所引用属性的相应类型的字符串。The value associated with each key should be a string that represents the appropriate type for the property referred to by that key. 您可以指定以下一个或多个键值对。You can specify one or more of these key-value pairs.
| 键Key | 属性类型Property Type | 属性说明Property Description |
|---|---|---|
"IsTransactional" |
bool |
指定 SqlTrackingService 是否应使用 WorkBatch 参与工作流事务。Specifies whether SqlTrackingService participates in workflow transactions by using the WorkBatch. 默认值为 true,指定将以同步方式将跟踪更改写入数据库。The default is true, specifying that tracking changes are written to the database in a synchronous manner. |
"UseDefaultProfile" |
bool |
指定在无法为 GetProfile 调用找到跟踪配置文件时,是否将返回默认跟踪配置文件。Specifies whether the default tracking profile will be returned if a tracking profile cannot be found for a GetProfile call. 默认值为 true,它指定将使用的默认跟踪配置文件。The default is true, specifying that the default tracking profile will be used. |
"ProfileChangeCheckInterval" |
double |
指定检查数据库以查找其跟踪配置文件更改的时间(以毫秒为单位)。Specifies the time in milliseconds at which to examine the database for changes to its tracking profiles. 默认值为 60000 毫秒。The default is 60000 milliseconds. |
"ConnectionString" |
string |
指定数据库连接字符串。Specifies the database connection string. 默认为空引用(在 Visual Basic 中为 Nothing)。The default is a null reference (Nothing in Visual Basic). |
"PartitionOnCompletion" |
bool |
指定在工作流实例完成时是否应将工作流实例的跟踪数据转移到数据库中当前活动的分区中。Specifies whether tracking data for a workflow instance should be moved to the currently active partition in the database when the workflow instance is completed. |
适用于
SqlTrackingService(String)
使用指定的数据库连接字符串来初始化 SqlTrackingService 类的新实例。Initializes a new instance of the SqlTrackingService class by using the specified database connection string.
public:
SqlTrackingService(System::String ^ connectionString);
public SqlTrackingService (string connectionString);
new System.Workflow.Runtime.Tracking.SqlTrackingService : string -> System.Workflow.Runtime.Tracking.SqlTrackingService
Public Sub New (connectionString As String)
参数
- connectionString
- String
有效的数据库连接字符串。A valid database connection string.
例外
数据库连接字符串无效。The database connection string is not valid.