More autofac

pull/21/head
Mark McDowall 12 years ago
parent 924d3d0c8e
commit c4e886a8f8

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

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

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

@ -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();

Loading…
Cancel
Save