Пример #1
0
        public StubHttpResponse(StubHttpContext context)
        {
            HttpContext = context;

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

            Cookies = new ResponseCookies(Headers, new DefaultObjectPool <StringBuilder>(new DefaultPooledObjectPolicy <StringBuilder>()));
        }
Пример #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
        }
Пример #3
0
 public StubHttpRequest(StubHttpContext context)
 {
     HttpContext = context;
 }
Пример #4
0
        public StubHttpResponse(StubHttpContext context)
        {
            HttpContext = context;

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