Thetype exposes the following members.
Adds dependency registrations from the default Enterprise Library configuration source to the provided Autofac container builder.
Adds dependency registrations from a specified Enterprise Library configuration source to the provided Autofac container builder.
Registers an Enterprise Library type registration with Autofac.
|UsingConstructorFromTLimit, TReflectionActivatorData, TStyle|
Sets a constructor preference on an Autofac registration based on the constructor information in an Enterprise Library type registration.
|WithInstanceScopeTLimit, TActivatorData, TRegistrationStyle|
Sets an object registration to the Autofac equivalent of the provided Enterprise Library instance scope.
|WithParametersFromTLimit, TReflectionActivatorData, TStyle|
Inspects the constructor parameters in an Enterprise Library type registration and applies those to an Autofac service registration.
The Microsoft Patterns and Practices Enterprise Library comes with an abstraction around dependency registration. These extension methods help translate these more general TypeRegistration instances into Autofac-specific registrations.
This is particularly useful in conjunction with the AutofacServiceLocator when you want to use Autofac as the mechanism for resolving Enterprise Library application block dependencies rather than Unity.
The primary Enterprise Library entry point is. If you're trying to get Enterprise Library application blocks to use Autofac, start there.
The simplest way to get started with Enterprise Library and Autofac is via RegisterEnterpriseLibrary(ContainerBuilder). While building your Autofac container, use that extension to get the configuration out of the default Enterprise Library configuration location and add the appropriate dependency registrations to your container.
After the container is built, use the AutofacServiceLocator to set the default Enterprise Library container for any internal resolutions it needs to make.
// Create the container and register EntLib configured dependencies. var builder = new ContainerBuilder(); builder.RegisterEnterpriseLibrary(); // Register any other dependencies, then build the container and set // the default EntLib service locator. var container = builder.Build(); var autofacLocator = new AutofacServiceLocator(container); EnterpriseLibraryContainer.Current = autofacLocator;