Home

Awesome

Autofac.Extras.CommonServiceLocator

Common Service Locator implementation for Autofac.

Build status

Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.

Quick Start

var builder = new ContainerBuilder();

// Perform registrations and build the container.
var container = builder.Build();

// Set the service locator to an AutofacServiceLocator.
var csl = new AutofacServiceLocator(container);
ServiceLocator.SetLocatorProvider(() => csl);

Check out the Autofac Common Service Locator documentation for more information.

Get Help

Need help with Autofac? We have a documentation site as well as API documentation. We're ready to answer your questions on Stack Overflow or check out the discussion forum.