DiagnosticSource.StopActivity(Activity, Object) Método

Definición

Detiene el elemento Activity dado, mantiene la actividad global Current y notifica a los consumidores que Activity se ha detenido.Stops the given Activity, maintains the global Current activity, and notifies consumers that the Activity was stopped.

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)

Parámetros

activity
Activity

Actividad que se va a detener.The activity to be stopped.

args
Object

Objeto que representa el valor pasado como una carga para el evento.An object that represents the value passed as a payload for the event.

Comentarios

Los productores pueden pasar detalles adicionales al consumidor en la carga.Producers may pass additional details to the consumer in the payload.

Los consumidores pueden tener acceso Activity.Current para agregar y aumentar la telemetría.Consumers can access Activity.Current to add context and/or augment telemetry.

Se aplica a