Beispiel #1
0
        protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
        {
            if (controllerType == null)
            {
                throw new HttpException(404,
                                        String.Format("The controller for path '{0}' could not be found.",
                                                      requestContext.HttpContext.Request.Path));
            }

            var controller = (IController)_resolver.GetService(controllerType);

            return(controller);
        }
Beispiel #2
0
 public object GetService(Type serviceType)
 {
     return(dependencyResolver.GetService(serviceType));
 }