public DispathMessage MapToControllerExcute(RouteData data) { RequestContext re = new RequestContext(); re.RouteData = data; string controllerName = data.Controller; IControllerFactory controllerFactory = ControllerBuilder.Current.GetControllerFactory(); IController controller = controllerFactory.CreateController(re, controllerName); controller.Execute(re); return re.RemainDispathUrlMessage; }
public override RouteData GetRouteData(string urlmessage) { DispathMessage obj; RouteData routeData = new RouteData(); routeData.Route = this; try { obj = DispathMessage.GetObjectBySerializeString(urlmessage); } catch { throw; } routeData.Values.Add("controller", obj.ControllerName); routeData.Values.Add("action", obj.ActionName); routeData.Values.Add("taskID", obj.TaskID); routeData.Values.Add("taskData", obj.TaskData); routeData.RouteHandler = RouteHandler; return routeData; }