示例#1
0
 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;
 }
示例#2
0
文件: Route.cs 项目: misun-ms/TinctV2
 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;
 }