Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 //
 // 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;
         }
     }
 }
Exemplo n.º 3
0
 public WebExceptionEventArgs(Exception ex, HttpRequest req, HttpResponse res)
 {
     this.Exception = ex;
     this.Request = req;
     this.Response = res;
 }