Share via


IDbContextOptionsExtensionWithDebugInfo Interface

Definition

Extended interface for extensions that also allows for debugging info to be gathered. This interface will likely be merged into IDbContextOptionsExtension in EF Core 3.0.

This interface is typically used by database providers (and other extensions). It is generally not used in application code.

public interface IDbContextOptionsExtensionWithDebugInfo : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension
type IDbContextOptionsExtensionWithDebugInfo = interface
    interface IDbContextOptionsExtension
Public Interface IDbContextOptionsExtensionWithDebugInfo
Implements IDbContextOptionsExtension
Derived
Implements

Properties

Info

Information/metadata about the extension.

(Inherited from IDbContextOptionsExtension)
LogFragment

Creates a message fragment for logging typically containing information about any useful non-default options that have been configured.

(Inherited from IDbContextOptionsExtension)

Methods

ApplyDefaults(IDbContextOptions)

Gives the extension a chance to configure defaults based on other options. Most extensions do not have dynamic defaults and so this will be a no-op.

(Inherited from IDbContextOptionsExtension)
ApplyServices(IServiceCollection)

Adds the services required to make the selected options work. This is used when there is no external IServiceProvider and EF is maintaining its own service provider internally. This allows database providers (and other extensions) to register their required services when EF is creating an service provider.

(Inherited from IDbContextOptionsExtension)
GetServiceProviderHashCode()

Returns a hash code created from any options that would cause a new IServiceProvider to be needed. Most extensions do not have any such options and should return zero.

(Inherited from IDbContextOptionsExtension)
PopulateDebugInfo(IDictionary<String,String>)

Populates a dictionary of information that may change between uses of the extension such that it can be compared to a previous configuration for this option and differences can be logged. The dictionary key should be prefixed by the extension name. For example, "SqlServer:".

Validate(IDbContextOptions)

Gives the extension a chance to validate that all options in the extension are valid. Most extensions do not have invalid combinations and so this will be a no-op. If options are invalid, then an exception should be thrown.

(Inherited from IDbContextOptionsExtension)

Applies to