TrackingService.GetTrackingChannel Method (TrackingParameters)


Must be overridden in the derived class, and when implemented, returns the channel that the run-time tracking infrastructure uses to send tracking records to the tracking service.

Namespace:   System.Workflow.Runtime.Tracking
Assembly:  System.Workflow.Runtime (in System.Workflow.Runtime.dll)

protected internal abstract TrackingChannel GetTrackingChannel(
	TrackingParameters parameters


Type: System.Workflow.Runtime.Tracking.TrackingParameters

The TrackingParameters associated with the workflow instance.

Return Value

Type: System.Workflow.Runtime.Tracking.TrackingChannel

The TrackingChannel that is used to send tracking records to the tracking service.

The run-time tracking infrastructure uses one TrackingChannel for each tracking service for each workflow instance. The workflow run-time engine calls GetTrackingChannel on each tracking service to get the TrackingChannel for that service. You can use the information passed in TrackingParameters to associate tracking data sent on the TrackingChannel for your tracking service with a particular root workflow instance.

The following example shows an implementation of the GetTrackingChannel method. This example is from the Termination Tracking Service SDK sample. For more information, seeTermination Tracking Service Sample.

/// <summary>
/// Returns a tracking channel that will receive instnce terminated events.
/// </summary>
protected override TrackingChannel GetTrackingChannel(TrackingParameters parameters)
    return new TerminationTrackingChannel(parameters, source);

.NET Framework
Available since 3.0
Return to top