DiagnosticListener.IsEnabled Method

Definition

Overloads

IsEnabled()

Determines whether there are any registered subscribers.

IsEnabled(String)

Checks whether the DiagnosticListener is enabled.

IsEnabled(String, Object, Object)

Checks if any subscriber to the diagnostic events is interested in receiving events with this name. Subscribers indicate their interest using a delegate provided in Subscribe.

IsEnabled()

Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs

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 IsEnabled(String) in performance-critical parts of the application to determine whether there are any listeners to the DiagnosticListener.

Applies to

IsEnabled(String)

Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs

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

name
String

The name of the event to check.

Returns

true if notifications are enabled; otherwise, false.

Applies to

IsEnabled(String, Object, Object)

Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs
Source:
DiagnosticListener.cs

Checks if any subscriber to the diagnostic events is interested in receiving events with this name. Subscribers indicate their interest using a delegate provided in Subscribe.

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

Parameters

name
String

The name of the event to check.

arg1
Object

The object that represents a context.

arg2
Object

The object that represents a context.

Returns

true if it is enabled, false otherwise.

Applies to