示例#1
0
        public void ProcessRequest(HttpContext context)
        {
            var wrappedContext = new HttpContextWrapper(context);
            var handler        = new NancyHandler();

            handler.ProcessRequest(wrappedContext);
        }
示例#2
0
 public void ProcessRequest(HttpContext context)
 {
     var engine = new NancyEngine(application, new RouteResolver(), application);
     var wrappedContext = new HttpContextWrapper(context);
     var handler = new NancyHandler(engine);
     handler.ProcessRequest(wrappedContext);
 }
示例#3
0
        public void ProcessRequest(HttpContext context)
        {
            var engine = new NancyEngine(
                CreateModuleLocator(),
                new RouteResolver());

            var wrappedContext = new HttpContextWrapper(context);
            var handler = new NancyHandler(engine);
            handler.ProcessRequest(wrappedContext);
        }
示例#4
0
        public HancyHandlerFixture()
        {
            this.context = A.Fake<HttpContextBase>();
            this.request = A.Fake<HttpRequestBase>();
            this.response = A.Fake<HttpResponseBase>();
            this.engine = A.Fake<INancyEngine>();
            handler = new NancyHandler(engine);

            A.CallTo(() => this.context.Request).Returns(this.request);
            A.CallTo(() => this.context.Response).Returns(this.response);
            A.CallTo(() => this.response.OutputStream).Returns(new MemoryStream());
        }
示例#5
0
 public void ProcessRequest(HttpContext context)
 {
     var wrappedContext = new HttpContextWrapper(context);
     var handler = new NancyHandler(_Engine);
     handler.ProcessRequest(wrappedContext);
 }