private Controller CreateController(IRailsEngineContext context)
{
UrlInfo info = context.UrlInfo;
if (logger.IsDebugEnabled)
{
logger.DebugFormat("Starting request process for '{0}'/'{1}.{2}' Extension '{3}' with url '{4}'",
info.Area, info.Controller, info.Action, info.Extension, info.UrlRaw);
}
IControllerFactory controllerFactory = (IControllerFactory) context.GetService(typeof(IControllerFactory));
Controller controller = controllerFactory.CreateController(info);
return controller;
}