More autofac

This commit is contained in:
Mark McDowall 2013-01-02 19:04:42 -08:00
parent 924d3d0c8e
commit c4e886a8f8
4 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test
{
InitLogging();
var dispatch = new CentralDispatch();
kernel = dispatch.Build();
kernel = dispatch.BuildContainer();
WebTimer.Stop();
}

View File

@ -165,7 +165,7 @@ namespace NzbDrone.Core
}
}
public IContainer Build()
public IContainer BuildContainer()
{
var container = ContainerBuilder.Build();

View File

@ -75,7 +75,7 @@ namespace NzbDrone.Web
MVCRegistration(dispatch.ContainerBuilder);
var container = dispatch.ContainerBuilder.Build();
var container = dispatch.BuildContainer();
DependencyResolver.SetResolver(new AutofacDependencyResolver(container));

View File

@ -29,6 +29,7 @@ namespace NzbDrone
private static void BindKernel(ContainerBuilder builder)
{
builder.RegisterAssemblyTypes(typeof(DiskProvider).Assembly).SingleInstance();
builder.RegisterType<Router>();
builder.RegisterType<ApplicationServer>().SingleInstance();
builder.RegisterType<ConfigFileProvider>().SingleInstance();