porting to web sample

This commit is contained in:
Ryan Nowak 2014-03-14 13:06:27 -07:00
parent 51e5a5bf19
commit 1a430f90ed
2 changed files with 4 additions and 2 deletions

View File

@ -37,6 +37,10 @@ namespace MvcSample
AutofacRegistration.Populate(containerBuilder, _serviceProvider, services);
containerBuilder.RegisterInstance<PassThroughAttribute>(new PassThroughAttribute());
// This is only needed in the selfhost sample - there's no need to port this to the web sample, since
// it's provided by default there.
containerBuilder.RegisterType<TypeActivator>().As<ITypeActivator>();
// Temporary until we have support for open generics in our DI system.
containerBuilder.RegisterGeneric(typeof(NestedProviderManager<>)).As(typeof(INestedProviderManager<>));
containerBuilder.RegisterGeneric(typeof(NestedProviderManagerAsync<>)).As(typeof(INestedProviderManagerAsync<>));

View File

@ -20,8 +20,6 @@ namespace Microsoft.AspNet.Mvc
{
var describe = new ServiceDescriber(configuration);
yield return describe.Transient<ITypeActivator, TypeActivator>();
yield return describe.Transient<IControllerFactory, DefaultControllerFactory>();
yield return describe.Transient<IControllerDescriptorFactory, DefaultControllerDescriptorFactory>();
yield return describe.Transient<IActionSelector, DefaultActionSelector>();