WarningsConfiguration 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.
Represents configuration for which warnings should be thrown, logged, or ignored. by database providers or extensions. These options are set using WarningsConfigurationBuilder.
public class WarningsConfiguration
type WarningsConfiguration = class
Public Class WarningsConfiguration
- Inheritance
-
WarningsConfiguration
Remarks
Instances of this class are designed to be immutable. To change an option, call one of the 'With...' methods to obtain a new instance with the option changed.
See Configuration for specific messages for more information and examples.
Constructors
WarningsConfiguration() |
Creates a new, empty configuration, with all options set to their defaults. |
WarningsConfiguration(WarningsConfiguration) |
Called by a derived class constructor when implementing the Clone() method. |
Properties
DefaultBehavior |
The option set from the DefaultBehavior method. |
Methods
Clone() |
Override this method in a derived class to ensure that any clone created is also of that class. |
GetBehavior(EventId) |
Gets the WarningBehavior set for the given event ID, or |
GetLevel(EventId) |
Gets the LogLevel set for the given event ID, or |
GetServiceProviderHashCode() |
Returns a hash code created from any options that would cause a new IServiceProvider to be needed. |
ShouldUseSameServiceProvider(WarningsConfiguration) |
Returns a value indicating whether all of the options used in GetServiceProviderHashCode() are the same as in the given extension. |
TryWithExplicit(EventId, WarningBehavior) |
Creates a new instance with the given explicit WarningBehavior set for the given event ID, but only if no explicit behavior has already been set. It is unusual to call this method directly. Instead use WarningsConfigurationBuilder. |
WithDefaultBehavior(WarningBehavior) |
Creates a new instance with all options the same as for this instance, but with the given option changed. It is unusual to call this method directly. Instead use WarningsConfigurationBuilder. |
WithExplicit(IEnumerable<EventId>, WarningBehavior) |
Creates a new instance with the given explicit WarningBehavior set for all given event IDs. It is unusual to call this method directly. Instead use WarningsConfigurationBuilder. |
WithExplicit(IEnumerable<ValueTuple<EventId,LogLevel>>) |
Creates a new instance with the given log level set for all given event IDs. It is unusual to call this method directly. Instead use WarningsConfigurationBuilder. |
Applies to
Entity Framework