Since the IoC/DI implementation in MVC 3 is most likely in its final form in the RC, I\'m looking for an updated implementation of the DependencyResolver, IControllerActiv
The interface has not changed since the beta release, so all of the implementations for various frameworks should still work. And the truth is, it's not that complicated of an interface... you should be able to roll your own without much hassle. For example, I did this one for Ninject:
public class NinjectDependencyResolver : IDependencyResolver
{
public NinjectDependencyResolver(IKernel kernel)
{
_kernel = kernel;
}
private readonly IKernel _kernel;
public object GetService(Type serviceType)
{
return _kernel.TryGet(serviceType);
}
public IEnumerable
Then wire it up in global.asax like this:
private static IKernel _kernel;
public IKernel Kernel
{
get { return _kernel; }
}
public void Application_Start()
{
_kernel = new StandardKernel(new CoreInjectionModule());
DependencyResolver.SetResolver(new NinjectDependencyResolver(Kernel));
...
}
Remember, you get all kinds of goodies for free at that point, including DI for controllers, controller factories, action filters and view base classes.
EDIT: To be clear, I'm not sure what your "activators" are, but you probably don't need them. The IDependencyResolver interface handles the newing-up of controllers and views automagically.