DiagnosticListener DiagnosticListener DiagnosticListener DiagnosticListener Class

Definición

Proporciona una implementación de la clase abstracta DiagnosticSource que representa una ubicación con nombre a la que un origen envía su información (eventos).Provides an implementation of the abstract DiagnosticSource class that represents a named place to which a source sends its information (events).

public ref class DiagnosticListener : System::Diagnostics::DiagnosticSource, IDisposable, IObservable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>>
public class DiagnosticListener : System.Diagnostics.DiagnosticSource, IDisposable, IObservable<System.Collections.Generic.KeyValuePair<string,object>>
type DiagnosticListener = class
    inherit DiagnosticSource
    interface IDisposable
    interface IObservable<KeyValuePair<string, obj>>
Public Class DiagnosticListener
Inherits DiagnosticSource
Implements IDisposable, IObservable(Of KeyValuePair(Of String, Object))
Herencia
DiagnosticListenerDiagnosticListenerDiagnosticListenerDiagnosticListener
Implementaciones

Comentarios

DiagnosticListeneres un NotificationSource, lo que significa que el resultado devuelto se puede usar para registrar notificaciones, pero también Subscribe tiene un método para que las notificaciones se puedan reenviar arbitrariamente.DiagnosticListener is a NotificationSource, which means the returned result can be used to log notifications, but it also has a Subscribe method so notifications can be forwarded arbitrarily. Por lo tanto, su trabajo es reenviar elementos del productor a todos los agentes de escucha (conversión múltiple).Thus, its job is to forward things from the producer to all the listeners (multi-casting). Por lo general, no DiagnosticListener debe usar el valor predeterminado, pero use el valor predeterminado, para que las notificaciones sean lo más públicas posible.Generally, you should not be making your own DiagnosticListener but use the default, so that notifications are as public as possible.

Para obtener más información sobre DiagnosticSource las DiagnosticListener clases y, vea la Guía del usuario de DiagnosticSource.For more information on the DiagnosticSource and DiagnosticListener classes, see DiagnosticSource User's Guide.

Constructores

DiagnosticListener(String) DiagnosticListener(String) DiagnosticListener(String) DiagnosticListener(String)

Crea un nuevo DiagnosticListener.Creates a new DiagnosticListener.

Propiedades

AllListeners AllListeners AllListeners AllListeners

Obtiene la colección de clientes de escucha de este elemento DiagnosticListener.Gets the collection of listeners for this DiagnosticListener.

Name Name Name Name

Obtiene el nombre de DiagnosticListener.Gets the name of this DiagnosticListener.

Métodos

Dispose() Dispose() Dispose() Dispose()

Desecha el elemento NotificationListeners.Disposes the NotificationListeners.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Inherited from Object)
IsEnabled() IsEnabled() IsEnabled() IsEnabled()

Determina si hay algún suscriptor registrado.Determines whether there are any registered subscribers.

IsEnabled(String) IsEnabled(String) IsEnabled(String) IsEnabled(String)

Comprueba si DiagnosticListener está habilitado.Checks whether the DiagnosticListener is enabled.

IsEnabled(String, Object, Object) IsEnabled(String, Object, Object) IsEnabled(String, Object, Object) IsEnabled(String, Object, Object)

Comprueba si DiagnosticListener está habilitado.Checks if the DiagnosticListener is enabled.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

(Inherited from Object)
OnActivityExport(Activity, Object) OnActivityExport(Activity, Object) OnActivityExport(Activity, Object) OnActivityExport(Activity, Object)

Invoca el método OnActivityExport de todos los suscriptores.Invokes the OnActivityExport method of all the subscribers.

OnActivityImport(Activity, Object) OnActivityImport(Activity, Object) OnActivityImport(Activity, Object) OnActivityImport(Activity, Object)

Invoca el método OnActivityImport de todos los suscriptores.Invokes the OnActivityImport method of all the subscribers.

StartActivity(Activity, Object) StartActivity(Activity, Object) StartActivity(Activity, Object) StartActivity(Activity, Object)

Inicia Activity y escribe un evento de inicio.Starts an Activity and writes a start event.

(Inherited from DiagnosticSource)
StopActivity(Activity, Object) StopActivity(Activity, Object) StopActivity(Activity, Object) StopActivity(Activity, Object)

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.

(Inherited from DiagnosticSource)
Subscribe(IObserver<KeyValuePair<String,Object>>) Subscribe(IObserver<KeyValuePair<String,Object>>) Subscribe(IObserver<KeyValuePair<String,Object>>) Subscribe(IObserver<KeyValuePair<String,Object>>)

Agrega un suscriptor.Adds a subscriber.

Subscribe(IObserver<KeyValuePair<String,Object>>, Func<String,Object,Object,Boolean>) Subscribe(IObserver<KeyValuePair<String,Object>>, Func<String,Object,Object,Boolean>) Subscribe(IObserver<KeyValuePair<String,Object>>, Func<String,Object,Object,Boolean>) Subscribe(IObserver<KeyValuePair<String,Object>>, Func<String,Object,Object,Boolean>)

Agrega un suscriptor y, opcionalmente, filtra los eventos en función de su nombre y hasta dos objetos de contexto.Adds a subscriber, and optionally filters events based on their name and up to two context objects.

Subscribe(IObserver<KeyValuePair<String,Object>>, Func<String,Object,Object,Boolean>, Action<Activity,Object>, Action<Activity,Object>) Subscribe(IObserver<KeyValuePair<String,Object>>, Func<String,Object,Object,Boolean>, Action<Activity,Object>, Action<Activity,Object>) Subscribe(IObserver<KeyValuePair<String,Object>>, Func<String,Object,Object,Boolean>, Action<Activity,Object>, Action<Activity,Object>) Subscribe(IObserver<KeyValuePair<String,Object>>, Func<String,Object,Object,Boolean>, Action<Activity,Object>, Action<Activity,Object>)

Agrega un suscriptor, opcionalmente filtra los eventos en función de su nombre y hasta dos objetos de contexto, y especifica los métodos a los que se va a llamar cuando los proveedores importen o exporten actividades externas al proceso.Adds a subscriber, optionally filters events based on their name and up to two context objects, and specifies methods to call when providers import or export activites from outside the process.

Subscribe(IObserver<KeyValuePair<String,Object>>, Predicate<String>) Subscribe(IObserver<KeyValuePair<String,Object>>, Predicate<String>) Subscribe(IObserver<KeyValuePair<String,Object>>, Predicate<String>) Subscribe(IObserver<KeyValuePair<String,Object>>, Predicate<String>)

Agrega un suscriptor y, opcionalmente, filtra los eventos en función de su nombre.Adds a subscriber, and optionally filters events based on their name.

ToString() ToString() ToString() ToString()

Devuelve una cadena con el nombre de este DiagnosticListener.Returns a string with the name of this DiagnosticListener.

Write(String, Object) Write(String, Object) Write(String, Object) Write(String, Object)

Registra una notificación.Logs a notification.

Se aplica a