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));
            }

            LocalizationSetterHelper.SetLocalizationCulture();
            return((IController)_kernel.Resolve(controllerType));
        }
예제 #2
0
 protected override void Initialize(HttpControllerContext controllerContext)
 {
     LocalizationSetterHelper.SetLocalizationCulture();
     base.Initialize(controllerContext);
 }