public StubHttpContext(IFeatureCollection features, IServiceProvider services) { Features = features; // Watch this. What is this? RequestServices = services; Request = new StubHttpRequest(this); Response = new StubHttpResponse(this); Cancellation = new CancellationTokenSource(); Authentication = new StubAuthenticationManager(this); }
public StubHttpContext(IFeatureCollection features, IServiceProvider services) { Features = features; features.Set <IHttpResponseFeature>(new HttpResponseFeature { Body = new MemoryStream() }); // Watch this. What is this? RequestServices = services; Request = new StubHttpRequest(this); Response = new StubHttpResponse(this); Cancellation = new CancellationTokenSource(); #if !NETCOREAPP3_0 Authentication = new StubAuthenticationManager(this); #endif }