示例#1
0
 /// <summary>
 /// Sets up the environment. This is only run when the server starts up, not
 /// for each request, so as much as possible should be done here. Returns a
 /// HttpHandler capable of serving Rack requests.
 /// </summary>
 public IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated) {
     if (_Handler == null) {
         var rack = new RackDispatcher(context);
         if (rack._failed)
             return null;
         _Handler = new AspNetHandler(rack);
     }
     return _Handler;
 }
示例#2
0
 /// <summary>
 /// Sets up the environment. This is only run when the server starts up, not
 /// for each request, so as much as possible should be done here. Returns a
 /// HttpHandler capable of serving Rack requests.
 /// </summary>
 public IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated)
 {
     if (_Handler == null)
     {
         var rack = new RackDispatcher(context);
         if (rack._failed)
         {
             return(null);
         }
         _Handler = new AspNetHandler(rack);
     }
     return(_Handler);
 }
示例#3
0
 public void Init(HttpApplication app) {
     app.BeginRequest += (sender, args) => {
         var httpApp = (sender as HttpApplication);
         if (_rack == null) {
             lock (this) {
                 if (_rack == null) {
                     _rack = new RackDispatcher(httpApp.Context);
                 }
             }
         }
         _rack.ProcessRequest(httpApp.Context);
         httpApp.CompleteRequest();
     };
 }
示例#4
0
 public void Init(HttpApplication app)
 {
     app.BeginRequest += (sender, args) => {
         var httpApp = (sender as HttpApplication);
         if (_rack == null)
         {
             lock (this) {
                 if (_rack == null)
                 {
                     _rack = new RackDispatcher(httpApp.Context);
                 }
             }
         }
         _rack.ProcessRequest(httpApp.Context);
         httpApp.CompleteRequest();
     };
 }
示例#5
0
 public void Dispose()
 {
     _rack = null;
 }
示例#6
0
 public AspNetHandler(RackDispatcher rack)
 {
     _rack = rack;
 }
示例#7
0
 public AspNetHandler(RackDispatcher rack)
 {
     _rack = rack;
 }
示例#8
0
 public void Dispose()
 {
     _rack = null;
 }