Share via


Enterprise Library Extension Points

The following tables list the extension points that Enterprise Library provides for each of the application blocks. For each type of provider or extension, the tables show:

  • The interface you can implement and/or the base class you can inherit.
  • The type of the configuration element to apply to your custom class to enable basic integration with the configuration system.
  • The base class that you must inherit in your custom configuration element if you want to implement full design-time configuration integration. Your custom provider or extension will then use your custom configuration element class as its configuration element type, instead of the default shown in the Configuration Element (basic integration) column.

Providers and extensions that cannot be integrated with the configuration tools have no entry in the Configuration Element (basic integration) column.

Caching Application Block

Custom Provider

or Extension

Interface or

Base Class

Configuration Element

(basic integration)

Configuration Element Base

Class (design time integration)

Backing Store

IBackingStore

BaseBackingStore

CustomCacheStorageData

CacheStorageData

Cache Manager

ICacheManager

CustomCacheManagerData

CacheManagerDataBase

Expiration Policy

ICacheItemExpiration

n/a

n/a

Storage Encryption Provider

IStorageEncryptionProvider

n/a

StorageEncryptionProviderData

Cryptography Application Block

Custom Provider

or Extension

Interface or

Base Class

Configuration Element

(basic integration)

Configuration Element Base

Class (design time integration)

Hash Algorithm Provider

IHashProvider

CustomHashProviderData

HashProviderData

Symmetric Encryption Algorithm Provider

ISymmetricCryptoProvider

CustomSymmetricCryptoProviderData

SymmetricProviderData

Data Access Application Block

Custom Provider

or Extension

Interface or

Base Class

Configuration Element

(basic integration)

Configuration Element Base

Class (design time integration)

Database Provider

Database

n/a

n/a

Exception Handling Application Block

Custom Provider

or Extension

Interface or

Base Class

Configuration Element

(basic integration)

Configuration Element Base

Class (design time integration)

Exception Handler

IExceptionHandler

CustomHandlerData

ExceptionHandlerData

Exception Formatter

ExceptionFormatter

n/a

n/a

Logging Application Block

Custom Provider

or Extension

Interface or

Base Class

Configuration Element

(basic integration)

Configuration Element Base

Class (design time integration)

Log Entry Formatter

ILogFormatter

CustomFormatterData

FormatterData

Trace Listener

CustomTraceListener

CustomTraceListenerData

TraceListenerData

Log Filter

ILogFilter

LogFilter

CustomLogFilterData

LogFilterData

If you implement a custom Log Filter by implementing the ILogFilter interface or by extending the LogFilter base class, you must be aware of an issue that can prevent application code from resolving the configured name of the provider. However, this is only an issue when you wish to query the collection of filters when checking if a log entry will be specifically blocked by this filter. The ILogFilter interface defines a Name property that should return the name of the instance of the custom log filter from the configuration. However, there currently is no way to retrieve that name from within your custom log filter. Instead, you can pass a key/value pair in the NameValueCollection received by the constructor, and use this to set the Name property of the filter. When configuring your custom log filter, you will have to duplicate the name: once for the actual name of that instance of the custom log filter, and again in the named property collection that is passed to the constructor.

Policy Injection Application Block

Policy injection is a feature driven by the Unity interception mechanism. You can create custom behaviors, call handlers, call handler attributes, and matching rules for use with the Unity interception mechanism. For more information, see https://www.codeplex.com/unity/.

Security Application Block

Custom Provider

or Extension

Interface or

Base Class

Configuration Element

(basic integration)

Configuration Element Base

Class (design time integration)

Authorization Provider

AuthorizationProvider

CustomAuthorizationProviderData

AuthorizationProviderData

Security Cache Provider

ISecurityCacheProvider

CustomSecurityCacheProviderData

SecurityCacheProviderData

Validation Application Block

Custom Provider

or Extension

Interface or

Base Class

Configuration Element

(basic integration)

Configuration Element Base

Class (design time integration)

Validator

Validator<T>

Validator

CustomValidatorData

ValidatorData

Validator Attribute

ValueValidatorAttribute

n/a

n/a

For more information about creating custom providers and extensions for Enterprise Library, see Enterprise Library Configuration Integration and Creating a Custom Provider.