DiagnosticListener.IsEnabled DiagnosticListener.IsEnabled DiagnosticListener.IsEnabled DiagnosticListener.IsEnabled Method

Definition

Overloads

IsEnabled() IsEnabled() IsEnabled() IsEnabled()

Determines whether there are any registered subscribers.

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

Checks whether the DiagnosticListener is enabled.

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

Checks if the DiagnosticListener is enabled.

IsEnabled() IsEnabled() IsEnabled() IsEnabled()

Determines whether there are any registered subscribers.

public:
 bool IsEnabled();
public bool IsEnabled ();
override this.IsEnabled : unit -> bool
Public Function IsEnabled () As Boolean

Returns

true if there are any registered subscribers, false otherwise.

Remarks

If setup for the notification is expensive, you can call IsEnabled before performing this setup. Producers may optionally call IsEnabled before calling <xref:System.Diagnostics.DiagnosticListener.IsEnabled(System.String) in performance-critical parts of the application to determine whether there are any listeners to the DiagnosticListener.

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

Checks whether the DiagnosticListener is enabled.

public:
 override bool IsEnabled(System::String ^ name);
public override bool IsEnabled (string name);
override this.IsEnabled : string -> bool
Public Overrides Function IsEnabled (name As String) As Boolean

Parameters

Returns

true if notifications are enabled; otherwise, false.

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

Checks if the DiagnosticListener is enabled.

public override bool IsEnabled (string name, object arg1, object arg2 = null);
override this.IsEnabled : string * obj * obj -> bool
Public Overrides Function IsEnabled (name As String, arg1 As Object, Optional arg2 As Object = null) As Boolean

Parameters

Returns

true if it is enabled, false otherwise.

Applies to