EventSource.IsEnabled Method (EventLevel, EventKeywords)
Determines whether the current event source that has the specified level and keyword is enabled.
Assembly: mscorlib (in mscorlib.dll)
Public Function IsEnabled ( level As EventLevel, keywords As EventKeywords ) As Boolean
The level of the event source.
The keyword of the event source.
Return ValueType: System.Boolean
true if the event source is enabled; otherwise, false.
The result of this method is only an approximation of whether a particular event is active. Use it to avoid expensive computation for logging when logging is disabled. Event sources may have additional filtering that determines their activity.
Available since 8
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Available since 8.1