public StubHttpResponse(StubHttpContext context) { HttpContext = context; _feature = context.Features.Get <IHttpResponseFeature>(); Cookies = new ResponseCookies(Headers, new DefaultObjectPool <StringBuilder>(new DefaultPooledObjectPolicy <StringBuilder>())); }
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 }
public StubHttpRequest(StubHttpContext context) { HttpContext = context; }
public StubHttpResponse(StubHttpContext context) { HttpContext = context; Cookies = new ResponseCookies(Headers, new DefaultObjectPool <StringBuilder>(new DefaultPooledObjectPolicy <StringBuilder>())); }