Ejemplo n.º 1
0
 public Streams(IISHttpContext context)
 {
     _context             = context;
     _request             = new HttpRequestStream(_context);
     _response            = new HttpResponseStream(_context, _context);
     _upgradeableResponse = new WrappingStream(_response);
     _upgradeableRequest  = new WrappingStream(_request);
 }
Ejemplo n.º 2
0
 public void StartAcceptingReads(IISHttpContext body)
 {
     // Only start if not aborted
     if (_state == HttpStreamState.Closed)
     {
         _state = HttpStreamState.Open;
         _body  = body;
     }
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 public AsyncIOEngine(IISHttpContext context, NativeSafeHandle handler)
 {
     _context = context;
     _handler = handler;
 }
Ejemplo n.º 5
0
 public HttpResponseStream(IHttpBodyControlFeature bodyControl, IISHttpContext context)
 {
     _bodyControl = bodyControl;
     _context     = context;
     _state       = HttpStreamState.Closed;
 }
Ejemplo n.º 6
0
 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());
 }
Ejemplo n.º 7
0
 public  void    When_constructing_an_IISHttpContext_the_context_argument_must_not_be_null()
 {
     var context = new IISHttpContext(null);
 }