protected void addControllerRoute(RouteBase route) { // コントローラIDの重複チェック foreach (RouteBase cur in routing) { if (cur.ID == route.ID) { throw new Exception("[ERROR] Multiple definition of controller ID."); } } routing.Add(route); }
public ActionResult callAction(int controllerID, int actionID, ArgBag arg) { RouteBase target = null; foreach (RouteBase route in routing) { if (route.ID == controllerID) { target = route; } } if (null != target) { return(target.controller.callAction(actionID, arg)); } else { return(null); } }