EventDefinitionBase Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Base class for event definitions.
[System.Runtime.CompilerServices.Nullable(0)]
public abstract class EventDefinitionBase
public abstract class EventDefinitionBase
[<System.Runtime.CompilerServices.Nullable(0)>]
type EventDefinitionBase = class
type EventDefinitionBase = class
Public MustInherit Class EventDefinitionBase
- Inheritance
-
EventDefinitionBase
- Derived
- Attributes
Remarks
See Implementation of database providers and extensions for more information and examples.
Constructors
| Name | Description |
|---|---|
| EventDefinitionBase(EventId, LogLevel, String) |
Creates an event definition instance. |
| EventDefinitionBase(EventId, LogLevel) |
Creates an event definition instance. |
| EventDefinitionBase(ILoggingOptions, EventId, LogLevel, String) |
Creates an event definition instance. |
Properties
| Name | Description |
|---|---|
| EventId |
The EventId. |
| EventIdCode |
A string representing the code that should be passed to ConfigureWarnings(Action<WarningsConfigurationBuilder>) to suppress this event as an error. |
| Level |
The LogLevel at which the event will be logged. |
| WarningBehavior |
The configured WarningBehavior. |
Methods
| Name | Description |
|---|---|
| GetLogBehavior<TLoggerCategory>(IDiagnosticsLogger<TLoggerCategory>) |
Gets the log behavior for this event. This determines whether it should be logged, thrown as an exception or ignored. |
| WarningAsError(String) |
Returns a warning-as-error exception wrapping the given message for this event. |