Activity.TrackData 方法

定义

向运行时跟踪基础结构通知有关挂起跟踪的信息。Informs the run-time tracking infrastructure of pending tracking information.

重载

TrackData(Object)

向运行时跟踪基础结构通知有关挂起跟踪的信息。Informs the run-time tracking infrastructure of pending tracking information.

TrackData(String, Object)

向运行时跟踪基础结构通知有关挂起跟踪的信息。Informs the run-time tracking infrastructure of pending tracking information.

TrackData(Object)

向运行时跟踪基础结构通知有关挂起跟踪的信息。Informs the run-time tracking infrastructure of pending tracking information.

protected:
 void TrackData(System::Object ^ userData);
protected void TrackData (object userData);
member this.TrackData : obj -> unit
Protected Sub TrackData (userData As Object)

参数

userData
Object

包含跟踪信息的 ObjectObject that contains the tracking information.

例外

userData 为空引用(在 Visual Basic 中为 Nothing)。userData is a null reference (Nothing in Visual Basic).

示例

下面的示例演示对 TrackData 方法的调用。The following example shows a call to the TrackData method. 此示例摘自“终止跟踪服务”SDK 示例。This example is from the Termination Tracking Service SDK sample. 有关详细信息,请参阅 终止跟踪服务示例For more information, see Termination Tracking Service Sample.

private void Track_ExecuteCode(object sender, EventArgs e)
{
    Console.WriteLine("Calling TrackData from workflow");
    this.TrackData("Hello - this is a UserTrackPoint");
}
Private Sub Track_ExecuteCode(ByVal sender As Object, ByVal e As EventArgs)

    Console.WriteLine("Calling TrackData from workflow")
    Me.TrackData("Hello - me is a UserTrackPoint")
End Sub

适用于

TrackData(String, Object)

向运行时跟踪基础结构通知有关挂起跟踪的信息。Informs the run-time tracking infrastructure of pending tracking information.

protected:
 void TrackData(System::String ^ userDataKey, System::Object ^ userData);
protected void TrackData (string userDataKey, object userData);
member this.TrackData : string * obj -> unit
Protected Sub TrackData (userDataKey As String, userData As Object)

参数

userDataKey
String

指向已更改的用户数据的键。The key to the user data that has changed.

userData
Object

包含跟踪信息的 ObjectObject that contains the tracking information.

例外

userData 为空引用(在 Visual Basic 中为 Nothing)。userData is a null reference (Nothing in Visual Basic).

适用于