autofacバージョン2.3.2.632のAutofac.Integration.Web.Mvcdllには、次のように定義されたクラスAutofacControllerFactoryがありました。
public class AutofacControllerFactory : DefaultControllerFactory
{
public AutofacControllerFactory(IContainerProvider containerProvider);
protected override IController GetControllerInstance(RequestContext context, Type controllerType);
public override void ReleaseController(IController controller);
}
最新バージョンのautofac(2.6.3.862)にはAutofac.Integration.Web.Mvcがありませんが、代わりにAutofac.Integration.Mvcがあります。ただし、このdllにはAutofacControllerFactoryクラスがありません。dll Autofac.Integration.Mvcには、AutofacDependencyResolverと呼ばれるクラスがあります。
public class AutofacDependencyResolver : IDependencyResolver
{
public AutofacDependencyResolver(ILifetimeScope container);
public AutofacDependencyResolver(ILifetimeScope container, Action<ContainerBuilder> configurationAction);
public AutofacDependencyResolver(ILifetimeScope container, ILifetimeScopeProvider lifetimeScopeProvider);
public AutofacDependencyResolver(ILifetimeScope container, ILifetimeScopeProvider lifetimeScopeProvider, Action<ContainerBuilder> configurationAction);
public ILifetimeScope ApplicationContainer { get; }
public static AutofacDependencyResolver Current { get; }
public ILifetimeScope RequestLifetimeScope { get; }
public object GetService(Type serviceType);
public IEnumerable<object> GetServices(Type serviceType);
}
Autofacの最新バージョンでのAutofacControllerFactoryの代替品は何ですか?