TrackingService.GetTrackingChannel(TrackingParameters) TrackingService.GetTrackingChannel(TrackingParameters) TrackingService.GetTrackingChannel(TrackingParameters) TrackingService.GetTrackingChannel(TrackingParameters) Method

Definition

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.

protected public:
 abstract System::Workflow::Runtime::Tracking::TrackingChannel ^ GetTrackingChannel(System::Workflow::Runtime::Tracking::TrackingParameters ^ parameters);
protected internal abstract System.Workflow.Runtime.Tracking.TrackingChannel GetTrackingChannel (System.Workflow.Runtime.Tracking.TrackingParameters parameters);
abstract member GetTrackingChannel : System.Workflow.Runtime.Tracking.TrackingParameters -> System.Workflow.Runtime.Tracking.TrackingChannel
Protected Friend MustOverride Function GetTrackingChannel (parameters As TrackingParameters) As TrackingChannel

Parameters

parameters
TrackingParameters TrackingParameters TrackingParameters TrackingParameters

The TrackingParameters associated with the workflow instance.

Returns

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

Examples

The following example shows an implementation of the GetTrackingChannel method. This example is from the Termination Tracking Service SDK sample. For more information, see Termination 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);
}
' Returns a tracking channel that will receive instnce terminated events.
Protected Overrides Function GetTrackingChannel(ByVal parameters As TrackingParameters) As TrackingChannel
    Return New TerminationTrackingChannel(parameters, source)
End Function

Remarks

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.

Applies to