public virtual void Begin(HttpRequest req, HttpResponse res, RouteInfo route, Application app) { this.Request = req; this.Response = res; this.RouteInfo = route; this.App = app; // Start the show this.PreHandle(); }
// // Members public void Route(HttpRequest req, HttpResponse res) { foreach (KeyValuePair<RouteInfo, Type> route in this.Routes) { Match m = route.Key.Pattern.Match(req.Path); if (m.Success) { route.Key.PatternMatch = m; try { IRouteHandler handler = (IRouteHandler)Activator.CreateInstance(route.Value); handler.Begin(req, res, route.Key, this.App); } catch { throw new RouteHandlerIsNotIRouteHandler(); } break; } } }
public WebExceptionEventArgs(Exception ex, HttpRequest req, HttpResponse res) { this.Exception = ex; this.Request = req; this.Response = res; }