A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.diagnosticsource.isenabled below:

DiagnosticSource.IsEnabled Method (System.Diagnostics) | Microsoft Learn

DiagnosticSource.IsEnabled Method Definition Overloads IsEnabled(String)
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs

Verifies if the notification event is enabled.

public:
 abstract bool IsEnabled(System::String ^ name);
public abstract bool IsEnabled(string name);
abstract member IsEnabled : string -> bool
Public MustOverride Function IsEnabled (name As String) As Boolean
Parameters
name
String

The name of the event being written.

Returns

true if the notification event is enabled, false otherwise.

Remarks

If there is expensive setup for the notification, you can call IsEnabled before performing this setup. Consumers should not assume that they only get notifications for which IsEnabled is true. However, it is optional for producers to call this API. The name should be the same as that passed to Write(String, Object).

IsEnabled(String, Object, Object)
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs
Source:
DiagnosticSource.cs

Verifies it the notification event is enabled.

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

The name of the event being written.

arg1
Object

An object that represents the additional context for IsEnabled. Consumers should expect to receive null, which might indicate that producer called pure IsEnabled(string) to check if consumer wants to get notifications for such events at all. Based on that, producer may call IsEnabled(string, object, object) again with non-null context.

arg2
Object

Optional. An object that represents the additional context for IsEnabled. null by default. Consumers should expect to receive null, which might indicate that producer called pure IsEnabled(string) or producer passed all necessary context in arg1.

Returns

true if the notification event is enabled, false otherwise.

Remarks

If there is expensive setup for the notification, you can call this method and provide context before performing the setup.

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4