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 中即將淘汰的類型

SqlTrackingService 類別代表功能完整的追蹤服務。 您可以使用此全新的服務收集和儲存追蹤資訊和儲存追蹤設定檔,並在工作流程執行階段引擎要求時提供它們。 SQL 追蹤服務會將執行階段追蹤基礎結構傳送給它的追蹤資料寫入 SQL 資料庫中。

在許多案例中,對 SqlTrackingService 而言,保持它的資料庫與工作流程執行階段引擎的狀態之間的一致性相當重要。 因此,SqlTrackingChannel 類別運用 IPendingWork 介面,以參與 WorkflowCommitWorkBatchService 提供的工作流程交易批次處理功能。 您可以設定 IsTransactional 或傳遞適當的參數到建構函式中以設定 SqlTrackingService 參與批次處理,並加入代表暫止變更 SQL 資料庫的物件到 WorkBatch

SqlTrackingService 也會在其資料庫中保存追蹤設定檔。 工作流程執行階段引擎必須能夠持續得知其使用中的追蹤設定檔的任何變更。 SqlTrackingService 會實作 IProfileNotification 介面,並定期在它的資料庫中檢查追蹤設定檔,以通知工作流程執行階段引擎有關這些 TrackingProfile 的變更。 您可以設定 ProfileChangeCheckInterval 或傳遞適當的參數到建構函式來設定 SqlTrackingService 檢查其追蹤設定檔的時間間隔,以通知追蹤執行階段關於任何設定檔變更。

注意

在工作流程應用程式中使用 SqlTrackingServiceSqlWorkflowPersistenceService 時,建議您使用單一資料庫進行保存和追蹤。

建構函式

SqlTrackingService(NameValueCollection)
已淘汰.

使用指定的 SqlTrackingService 來初始化 NameValueCollection 類別的新執行個體。

SqlTrackingService(String)
已淘汰.

使用指定的資料庫連線字串,初始化 SqlTrackingService 類別的新執行個體。

屬性

ConnectionString
已淘汰.

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

EnableRetries
已淘汰.

取得或設定值,指定 SqlTrackingService 執行資料庫作業時是否進行重試。

IsTransactional
已淘汰.

取得或設定值,這個值指出 SqlTrackingService 是否參與工作流程異動。

PartitionOnCompletion
已淘汰.

取得或設定值,這個值指定在完成工作流程執行個體時,工作流程執行個體的追蹤資料是否應移到資料庫的使用中的磁碟分割。

ProfileChangeCheckInterval
已淘汰.

取得或設定值,指定檢查資料庫查看追蹤設定檔有無任何變更的時間間隔。

Runtime
已淘汰.

取得此服務的 WorkflowRuntime

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

取得 WorkflowRuntimeService 的狀態。

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

取得或設定值,指定是否應將預設的 TrackingProfile 使用於沒有追蹤設定檔的工作流程類型。

方法

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()
已淘汰.

在衍生類別中覆寫時,啟動服務並將 State 變更為 Starting

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

在衍生類別中覆寫時,停止服務並將 State 變更為 Stopping

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

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

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

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

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

必須在衍生類別中覆寫,而且在實作後,如果追蹤設定檔自上次載入後已變更,則擷取指定之工作流程執行個體的新追蹤設定檔。

(繼承來源 TrackingService)

事件

ProfileRemoved
已淘汰.

發生在 SqlTrackingService 偵測到已刪除 TrackingProfile 時。

ProfileUpdated
已淘汰.

發生在 SqlTrackingService 偵測到已變更 TrackingProfile 時。

適用於

另請參閱