Ejemplo n.º 1
0
        public StubHttpResponse(StubHttpContext context)
        {
            HttpContext = context;

            _feature = context.Features.Get <IHttpResponseFeature>();

            Cookies = new ResponseCookies(Headers, new DefaultObjectPool <StringBuilder>(new DefaultPooledObjectPolicy <StringBuilder>()));
        }
Ejemplo n.º 2
0
        public StubHttpResponse(StubHttpContext context)
        {
            HttpContext = context;

            _httpResponseFeature = context.Features.Get <IHttpResponseFeature>();

#if NETCOREAPP3_0
            Cookies   = new StubResponseCookieCollection();
            _features = context.Features;
            _features.Set <IHttpResponseBodyFeature>(new StreamResponseBodyFeature(new MemoryStream()));
#else
            Cookies =
                new ResponseCookies(Headers, new DefaultObjectPool <StringBuilder>(new DefaultPooledObjectPolicy <StringBuilder>()));
#endif
        }
Ejemplo n.º 3
0
 public StubHttpRequest(StubHttpContext context)
 {
     HttpContext = context;
 }
Ejemplo n.º 4
0
        public StubHttpResponse(StubHttpContext context)
        {
            HttpContext = context;

            Cookies = new ResponseCookies(Headers, new DefaultObjectPool <StringBuilder>(new DefaultPooledObjectPolicy <StringBuilder>()));
        }