共用方式為


DiagnosticSource.StopActivity 方法

定義

多載

StopActivity(Activity, Object)

停止指定的 Activity,維護全域 Current 活動,然後通知取用者已停止 Activity

StopActivity<T>(Activity, T)

StopActivity(Activity, Object)

來源:
DiagnosticSourceActivity.cs
來源:
DiagnosticSourceActivity.cs
來源:
DiagnosticSourceActivity.cs

停止指定的 Activity,維護全域 Current 活動,然後通知取用者已停止 Activity

public:
 void StopActivity(System::Diagnostics::Activity ^ activity, System::Object ^ args);
public void StopActivity (System.Diagnostics.Activity activity, object? args);
public void StopActivity (System.Diagnostics.Activity activity, object args);
member this.StopActivity : System.Diagnostics.Activity * obj -> unit
Public Sub StopActivity (activity As Activity, args As Object)

參數

activity
Activity

要停止的活動。

args
Object

物件,代表已傳遞為事件承載的值。

備註

產生者可能會將其他詳細數據傳遞給承載中的取用者。

取用者可以存取 Activity.Current 以新增內容和/或增強遙測。

適用於

StopActivity<T>(Activity, T)

來源:
DiagnosticSourceActivity.cs
來源:
DiagnosticSourceActivity.cs
public:
generic <typename T>
 void StopActivity(System::Diagnostics::Activity ^ activity, T args);
public void StopActivity<T> (System.Diagnostics.Activity activity, T args);
member this.StopActivity : System.Diagnostics.Activity * 'T -> unit
Public Sub StopActivity(Of T) (activity As Activity, args As T)

類型參數

T

參數

activity
Activity
args
T

適用於