i studying by the book Pro asp.net mvc2 by apress, In the book the author uses ninject for dependency injection. He inherits the default control factory :
public class NinjectControllerFactory : DefaultControllerFactory
and then overrides : GetControllerInstance
I have 2 questions.
how does the DefaultControllerFactory knows what controller to load ? i assume he uses the route table and then loads it with reflection. am i correct ?
and how the ninject knows to do it, the only line i wrote is :
private IKernel kernel = new StandardKernel(); return (IController)kernel.Get(controllerType);
Ninject can't possibly know about my route table and which control he should load .. so how does he knows ?
ps. i use the regular ninject, not some specific version that created for MVC (which i believe they have on their website also)