public Streams(IISHttpContext context) { _context = context; _request = new HttpRequestStream(_context); _response = new HttpResponseStream(_context, _context); _upgradeableResponse = new WrappingStream(_response); _upgradeableRequest = new WrappingStream(_request); }
public void StartAcceptingReads(IISHttpContext body) { // Only start if not aborted if (_state == HttpStreamState.Closed) { _state = HttpStreamState.Open; _body = body; } }
public void When_getting_the_ApplicationInstance_from_the_IISHttpContext_instance_our_mockHttpApplication_should_be_returned() { var context = new IISHttpContext ( this.httpContext, hostContext=>this.mockHttpApplication.Object, hostContext=>this.mockHttpRequest.Object, hostContext=>this.mockHttpServer.Object, hostContext=>this.mockHttpResponse.Object, user=>this.mockHostPrincipal.Object, ()=>this.mockHostHandler.Object ); Assert.AreEqual(this.mockHttpApplication.Object, context.ApplicationInstance); }
public AsyncIOEngine(IISHttpContext context, NativeSafeHandle handler) { _context = context; _handler = handler; }
public HttpResponseStream(IHttpBodyControlFeature bodyControl, IISHttpContext context) { _bodyControl = bodyControl; _context = context; _state = HttpStreamState.Closed; }
public void When_constructing_an_IISHttpContext_using_the_default_constructor_the_IISHttpContext_object_should_create_a_default_IISHttpHandler_class_instance_for_the_Handler_property() { var context = new IISHttpContext(this.httpContext); Assert.IsNotNull(context.Handler); Assert.AreEqual(typeof(IISHttpHandler), context.Handler.GetType()); }
public void When_constructing_an_IISHttpContext_the_context_argument_must_not_be_null() { var context = new IISHttpContext(null); }