SqlTrackingService 類別

定義

警告

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

代表一種使用 SQL 資料庫來儲存追蹤資訊的追蹤服務。

public ref class SqlTrackingService sealed : System::Workflow::Runtime::Tracking::TrackingService, System::Workflow::Runtime::Tracking::IProfileNotification
public sealed class SqlTrackingService : System.Workflow.Runtime.Tracking.TrackingService, System.Workflow.Runtime.Tracking.IProfileNotification
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class SqlTrackingService : System.Workflow.Runtime.Tracking.TrackingService, System.Workflow.Runtime.Tracking.IProfileNotification
type SqlTrackingService = class
    inherit TrackingService
    interface IProfileNotification
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type SqlTrackingService = class
    inherit TrackingService
    interface IProfileNotification
Public NotInheritable Class SqlTrackingService
Inherits TrackingService
Implements IProfileNotification
繼承
屬性
實作

備註

備註

此數據會討論已過時的類型和命名空間。 欲了解更多資訊,請參閱 Windows Workflow Foundation 4.5 中的 Deprecated Types。

SqlTrackingService 類別代表一個功能完整的追蹤服務。 你可以開箱即用此服務收集與儲存追蹤資訊,並儲存追蹤設定檔,並在工作流程執行引擎要求時提供。 SQL 追蹤服務會將執行時追蹤基礎設施傳送到它的追蹤資料寫入 SQL 資料庫。

在許多情況下,維持資料庫與工作流程執行引擎狀態之間的一致性非常重要 SqlTrackingService 。 因此,該 SqlTrackingChannel 類別利用介面 IPendingWork 參與 WorkflowCommitWorkBatchService由 . 你可以設定IsTransactional或傳遞適當的參數給建構子,讓 參與SqlTrackingService批次處理,並新增代表 SQL 資料庫待處理變更的物件。WorkBatch

他們 SqlTrackingService 也在其資料庫中維護追蹤檔案。 工作流程執行引擎必須隨時掌握其所使用的追蹤設定檔的變更。 該 SqlTrackingService 介面會 IProfileNotification 實作並定期檢視資料庫中的追蹤設定檔,以通知工作流程執行引擎資料庫中儲存的變更 TrackingProfile 。 你可以設定 ProfileChangeCheckInterval 或傳達適當的參數給建構子,以設定檢查 SqlTrackingService 追蹤設定檔的間隔,以通知追蹤執行時間內任何設定檔變更。

備註

在工作流程應用程式中使用 和 SqlTrackingServiceSqlWorkflowPersistenceService ,建議同時使用一個資料庫來進行持久化和追蹤。

建構函式

名稱 Description
SqlTrackingService(NameValueCollection)
已淘汰.

透過指定的 NameValueCollection初始化類別的新實例SqlTrackingService

SqlTrackingService(String)
已淘汰.

利用指定的資料庫連接字串初始化 SqlTrackingService 類別的新實例。

屬性

名稱 Description
ConnectionString
已淘汰.

取得追蹤資料庫的 連接字串。

EnableRetries
已淘汰.

取得或設定一個值,指定執行資料庫操作時是否 SqlTrackingService 會重試。

IsTransactional
已淘汰.

取得或設定一個值,指示是否 SqlTrackingService 參與工作流程交易。

PartitionOnCompletion
已淘汰.

取得或設定一個值,指定工作流程實例完成後,是否應將追蹤資料移至資料庫中目前活躍的分割區。

ProfileChangeCheckInterval
已淘汰.

取得或設定一個值,指定資料庫在哪個間隔檢查一個或多個追蹤設定檔是否有變動。

Runtime
已淘汰.

為了這項服務,他得到了。WorkflowRuntime

(繼承來源 WorkflowRuntimeService)
State
已淘汰.

取得 的狀態 WorkflowRuntimeService

(繼承來源 WorkflowRuntimeService)
UseDefaultProfile
已淘汰.

會取得或設定一個值,指定是否應該對沒有追蹤輪廓的工作流程類型使用預設 TrackingProfile 值。

方法

名稱 Description
Equals(Object)
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()
已淘汰.

做為預設哈希函式。

(繼承來源 Object)
GetProfile(Guid)
已淘汰.

必須在派生類別中覆寫,實作後會回傳指定工作流程實例的追蹤設定檔。

(繼承來源 TrackingService)
GetProfile(Type, Version)
已淘汰.

必須在派生類別中覆寫,實作後會回傳以版本限定的追蹤設定檔,針對指定工作流程 Type

(繼承來源 TrackingService)
GetTrackingChannel(TrackingParameters)
已淘汰.

必須在衍生類別中覆寫,實作後會回傳執行時追蹤基礎設施用來傳送追蹤紀錄給追蹤服務的通道。

(繼承來源 TrackingService)
GetType()
已淘汰.

取得目前實例的 Type

(繼承來源 Object)
MemberwiseClone()
已淘汰.

建立目前 Object的淺層複本。

(繼承來源 Object)
OnStarted()
已淘汰.

當 在派生類別中被覆寫時,代表當工作流程執行引擎提出 Started 事件時將被呼叫的方法。

(繼承來源 WorkflowRuntimeService)
OnStopped()
已淘汰.

當 在派生類別中被覆寫時,代表當工作流程執行引擎提出 Stopped 事件時將被呼叫的方法。

(繼承來源 WorkflowRuntimeService)
RaiseServicesExceptionNotHandledEvent(Exception, Guid)
已淘汰.

引發 ServicesExceptionNotHandled 事件。

(繼承來源 WorkflowRuntimeService)
Start()
已淘汰.

當在派生類別中被覆寫時,啟動服務並將 變更 StateStarting

(繼承來源 WorkflowRuntimeService)
Stop()
已淘汰.

當在導出類別中被覆寫時,會停止服務並將 變更 StateStopping

(繼承來源 WorkflowRuntimeService)
ToString()
已淘汰.

傳回表示目前 物件的字串。

(繼承來源 Object)
TryGetProfile(Type, TrackingProfile)
已淘汰.

必須在衍生類別中覆寫,實作後會取得指定工作流程類型的追蹤設定檔(若有)。

(繼承來源 TrackingService)
TryReloadProfile(Type, Guid, TrackingProfile)
已淘汰.

必須在派生類別中覆寫,並在實作後,若該工作流程實例自上次載入以來有變更,則會為該工作流實例取得新的追蹤設定檔。

(繼承來源 TrackingService)

事件

名稱 Description
ProfileRemoved
已淘汰.

當偵測 SqlTrackingService 到 a TrackingProfile 已被刪除時,會發生這種情況。

ProfileUpdated
已淘汰.

當偵測 SqlTrackingService 到 a TrackingProfile 已被更改時,會發生這種情況。

適用於