Web.Generics.Web.Mvc.Infrastructure.GenericControllerFactory.GetControllerInstance C# (CSharp) Method

GetControllerInstance() protected method

protected GetControllerInstance ( System.Web.Routing.RequestContext requestContext, Type controllerType ) : IController
requestContext System.Web.Routing.RequestContext
controllerType System.Type
return IController
		protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
		{
			if (controllerType != null) return container.Resolve(controllerType) as IController;
            throw new HttpException(404, String.Format("The controller for path '{0}' could not be found or it does not implement IController.", requestContext.HttpContext.Request.Path));
		}
	}