示例#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();
        }
示例#2
0
文件: Routing.cs 项目: tstone/Fusion
 //
 // 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;
         }
     }
 }
示例#3
0
 public WebExceptionEventArgs(Exception ex, HttpRequest req, HttpResponse res)
 {
     this.Exception = ex;
     this.Request = req;
     this.Response = res;
 }