private void WriteResponse(HttpListenerContext ctx)
        {
            var bytes = _microWeb.ResolveRoute(MapRequestInfo(ctx.Request));

            ctx.Response.ContentLength64 = bytes.Length;
            ctx.Response.OutputStream.Write(bytes, 0, bytes.Length);
        }
예제 #2
0
        private void OnPreRequestHandlerExecute(object sender, EventArgs eventArgs)
        {
            var app     = (HttpApplication)sender;
            var request = app.Context.Request;

            app.Context.Response.Write(_microWeb.ResolveRoute(MapRequestInfo(request)));
        }
예제 #3
0
 private byte[] ResolveRouteToBytes(HttpListenerContext ctx)
 {
     return(_microWeb.ResolveRoute(MapRequestInfo(ctx.Request)));
 }