13 implementations of Set
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
326void IFeatureCollection.Set<TFeature>(TFeature? feature) where TFeature : default
Microsoft.AspNetCore.Hosting.Tests (2)
HostingApplicationTests.cs (1)
226public void Set<TFeature>(TFeature instance) => Features.Set(instance);
WebHostTests.cs (1)
1336public void Set<TFeature>(TFeature instance)
Microsoft.AspNetCore.Owin (1)
OwinFeatureCollection.cs (1)
387public void Set<TFeature>(TFeature instance)
Microsoft.AspNetCore.Server.HttpSys (1)
StandardFeatureCollection.cs (1)
111public void Set<TFeature>(TFeature? instance)
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.FeatureCollection.cs (1)
321void IFeatureCollection.Set<TFeature>(TFeature? instance) where TFeature : default
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpProtocol.Generated.cs (1)
651void IFeatureCollection.Set<TFeature>(TFeature? feature) where TFeature : default
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
326void IFeatureCollection.Set<TFeature>(TFeature? feature) where TFeature : default
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
326void IFeatureCollection.Set<TFeature>(TFeature? feature) where TFeature : default
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
326void IFeatureCollection.Set<TFeature>(TFeature? feature) where TFeature : default
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (1)
236void IFeatureCollection.Set<TFeature>(TFeature? feature) where TFeature : default
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
326void IFeatureCollection.Set<TFeature>(TFeature? feature) where TFeature : default
Microsoft.Extensions.Features (1)
FeatureCollection.cs (1)
138public void Set<TFeature>(TFeature? instance)
428 references to Set
Aspire.Dashboard (1)
Authentication\Connection\ConnectionTypeMiddleware.cs (1)
26context.Features.Set<IConnectionTypeFeature>(new ConnectionTypeFeature { ConnectionTypes = _connectionTypes });
BasicWebSite (1)
StartupRequestLimitSize.cs (1)
24httpContext.Features.Set<IHttpMaxRequestBodySizeFeature>(
ClientSample (1)
Tcp\TcpConnection.cs (1)
37Features.Set<IConnectionInherentKeepAliveFeature>(this);
InMemory.FunctionalTests (11)
KestrelMetricsTests.cs (1)
356features.Set<IConnectionMetricsTagsFeature>(overridenFeature);
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (10)
1010Features.Set<IConnectionLifetimeNotificationFeature>(this); 1011Features.Set<IConnectionHeartbeatFeature>(this); 1012Features.Set<IProtocolErrorCodeFeature>(this); 1014Features.Set<IConnectionMetricsTagsFeature>(this); 1155Features.Set<IStreamDirectionFeature>(this); 1156Features.Set<IStreamIdFeature>(this); 1157Features.Set<IStreamAbortFeature>(this); 1158Features.Set<IProtocolErrorCodeFeature>(this); 1159Features.Set<IPersistentStateFeature>(this); 1160Features.Set<IStreamClosedFeature>(this);
Interop.FunctionalTests (2)
Http3\Http3RequestTests.cs (2)
1228context.Features.Set<IMemoryPoolFeature>(new MemoryPoolFeature() { MemoryPool = memoryPool }); 1240context.Features.Set<IMemoryPoolFeature>(new MemoryPoolFeature() { MemoryPool = memoryPool });
Kestrel.SampleApp (1)
ClientCertBufferingFeature.cs (1)
32context.Features.Set<ITlsConnectionFeature>(new ClientCertBufferingFeature(tlsFeature, context));
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgery.cs (1)
272httpContext.Features.Set(antiforgeryFeature);
Microsoft.AspNetCore.Antiforgery.Test (2)
DefaultAntiforgeryTest.cs (2)
1265context.HttpContext.Features.Set<IHttpResponseFeature>(testResponse); 1413httpContext.Features.Set(antiforgeryFeature);
Microsoft.AspNetCore.Authentication (3)
AuthenticationMiddleware.cs (3)
42context.Features.Set<IAuthenticationFeature>(new AuthenticationFeature 70context.Features.Set<IHttpAuthenticationFeature>(authFeatures); 71context.Features.Set<IAuthenticateResultFeature>(authFeatures);
Microsoft.AspNetCore.Authentication.Negotiate.Test (4)
EventTests.cs (2)
468context.Features.Set<IConnectionItemsFeature>(connection); 469context.Features.Set<IConnectionCompleteFeature>(connection);
NegotiateHandlerTests.cs (2)
492context.Features.Set<IConnectionItemsFeature>(connection); 493context.Features.Set<IConnectionCompleteFeature>(connection);
Microsoft.AspNetCore.Authorization.Policy (2)
AuthorizationMiddleware.cs (2)
166context.Features.Set<IHttpAuthenticationFeature>(authFeatures); 167context.Features.Set<IAuthenticateResultFeature>(authFeatures);
Microsoft.AspNetCore.Authorization.Test (2)
AuthorizationMiddlewareTests.cs (2)
934context.Features.Set<IAuthenticateResultFeature>(testAuthenticateResultFeature); 960context.Features.Set<IAuthenticateResultFeature>(testAuthenticateResultFeature);
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
EndpointHtmlRendererTest.cs (1)
765ctx.Features.Set(responseMock.Object);
RazorComponentResultTest.cs (1)
244httpContext.Features.Set(responseMock.Object);
Microsoft.AspNetCore.Connections.Abstractions (6)
DefaultConnectionContext.cs (6)
48Features.Set<IConnectionUserFeature>(this); 49Features.Set<IConnectionItemsFeature>(this); 50Features.Set<IConnectionIdFeature>(this); 51Features.Set<IConnectionTransportFeature>(this); 52Features.Set<IConnectionLifetimeFeature>(this); 53Features.Set<IConnectionEndPointFeature>(this);
Microsoft.AspNetCore.CookiePolicy (2)
CookiePolicyMiddleware.cs (2)
67context.Features.Set<IResponseCookiesFeature>(new CookiesWrapperFeature(wrapper)); 68context.Features.Set<ITrackingConsentFeature>(wrapper);
Microsoft.AspNetCore.CookiePolicy.Test (1)
CookiePolicyTests.cs (1)
329context.Features.Set<IResponseCookiesFeature>(new TestCookieFeature());
Microsoft.AspNetCore.Diagnostics (7)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (2)
96httpContext.Features.Set<IExceptionHandlerFeature>(exceptionHandlerFeature); 97httpContext.Features.Set<IExceptionHandlerPathFeature>(exceptionHandlerFeature);
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (2)
166context.Features.Set<IExceptionHandlerFeature>(exceptionHandlerFeature); 167context.Features.Set<IExceptionHandlerPathFeature>(exceptionHandlerFeature);
StatusCodePage\StatusCodePagesExtensions.cs (2)
181context.HttpContext.Features.Set<IStatusCodeReExecuteFeature>(new StatusCodeReExecuteFeature() 212context.HttpContext.Features.Set<IStatusCodeReExecuteFeature?>(null);
StatusCodePage\StatusCodePagesMiddleware.cs (1)
42context.Features.Set<IStatusCodePagesFeature>(statusCodeFeature);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (6)
Latency\AddServerTimingHeaderMiddlewareTests.cs (1)
39context.Features.Set<IHttpResponseFeature>(fakeHttpResponseFeature);
Latency\RequestLatencyTelemetryMiddlewareTests.cs (5)
39httpContextMock.Features.Set<IHttpResponseFeature>(fakeHttpResponseFeature); 69httpContextMock.Features.Set<IHttpResponseFeature>(fakeHttpResponseFeature); 97httpContextMock.Features.Set<IHttpResponseFeature>(fakeHttpResponseFeature); 128httpContextMock.Features.Set<IHttpResponseFeature>(fakeHttpResponseFeature); 221httpContextMock.Features.Set(feature.Object);
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerMiddlewareTest.cs (1)
255httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature());
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\CallHandlers\ServerCallHandlerBase.cs (1)
45httpContext.Features.Set<IServerCallContextFeature>(serverCallContext);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (2)
Infrastructure\TestHelpers.cs (1)
31httpContext.Features.Set<IHttpRequestLifetimeFeature>(new HttpRequestLifetimeFeature(cancellationToken));
JsonTranscodingServerCallContextTests.cs (1)
68httpContext.Features.Set<IHttpRequestLifetimeFeature>(new HttpRequestLifetimeFeature(cancellationToken));
Microsoft.AspNetCore.HeaderParsing (1)
HeaderParsingHttpRequestExtensions.cs (1)
31context.Features.Set(feature);
Microsoft.AspNetCore.Hosting (2)
Internal\HostingApplicationDiagnostics.cs (2)
62httpContext.Features.Set<IHttpMetricsTagsFeature>(context.MetricsTagsFeature); 98httpContext.Features.Set<IHttpActivityFeature>(context.HttpActivityFeature);
Microsoft.AspNetCore.Hosting.Tests (7)
GenericWebHostBuilderTests.cs (1)
135Features.Set<IServerAddressesFeature>(this);
HostingApplicationTests.cs (3)
152httpContext.Features.Set<IHttpActivityFeature>(overridenFeature); 169httpContext.Features.Set<IHttpActivityFeature>(new TestHttpActivityFeature()); 226public void Set<TFeature>(TFeature instance) => Features.Set(instance);
HostingMetricsTests.cs (1)
171httpContext.Features.Set<IHttpMetricsTagsFeature>(overridenFeature);
WebHostTests.cs (2)
913features.Set<IHttpRequestIdentifierFeature>(requestIdentifierFeature); 1229Features.Set<IServerAddressesFeature>(new ServerAddressesFeature());
Microsoft.AspNetCore.Http (8)
DefaultHttpContext.cs (3)
54Features.Set<IHttpRequestFeature>(new HttpRequestFeature()); 55Features.Set<IHttpResponseFeature>(new HttpResponseFeature()); 56Features.Set<IHttpResponseBodyFeature>(new StreamResponseBodyFeature(Stream.Null));
Internal\DefaultHttpResponse.cs (2)
79_features.Collection.Set(streamFeature.PriorFeature); 83_features.Collection.Set<IHttpResponseBodyFeature>(new StreamResponseBodyFeature(value, otherFeature));
RequestFormReaderExtensions.cs (1)
37features.Set<IFormFeature>(new FormFeature(request, options));
Timeouts\RequestTimeoutsMiddleware.cs (2)
104context.Features.Set<IHttpRequestTimeoutFeature>(feature); 133context.Features.Set<IHttpRequestTimeoutFeature>(null);
Microsoft.AspNetCore.Http.Abstractions.Tests (4)
EndpointHttpContextExtensionsTests.cs (4)
28context.Features.Set<IEndpointFeature>(new EndpointFeature 46context.Features.Set<IEndpointFeature>(new EndpointFeature 97context.Features.Set<IEndpointFeature>(initialFeature); 119context.Features.Set<IEndpointFeature>(initialFeature);
Microsoft.AspNetCore.Http.Connections (13)
Internal\HttpConnectionContext.cs (12)
89Features.Set<IConnectionUserFeature>(this); 90Features.Set<IConnectionItemsFeature>(this); 91Features.Set<IConnectionIdFeature>(this); 92Features.Set<IConnectionTransportFeature>(this); 93Features.Set<IConnectionHeartbeatFeature>(this); 94Features.Set<ITransferFormatFeature>(this); 95Features.Set<IHttpContextFeature>(this); 96Features.Set<IHttpTransportFeature>(this); 97Features.Set<IConnectionInherentKeepAliveFeature>(this); 98Features.Set<IConnectionLifetimeFeature>(this); 99Features.Set<IConnectionLifetimeNotificationFeature>(this); 104Features.Set<IStatefulReconnectFeature>(this);
Internal\HttpConnectionDispatcher.cs (1)
603connection.Features.Set(context.Features.Get<IHttpConnectionFeature>());
Microsoft.AspNetCore.Http.Connections.Client (2)
HttpConnection.cs (2)
164Features.Set<IConnectionInherentKeepAliveFeature>(this); 546Features.Set(reconnectFeature);
Microsoft.AspNetCore.Http.Connections.Tests (18)
HttpConnectionDispatcherTests.cs (16)
262context.Features.Set<IHttpResponseFeature>(new ResponseFeature()); 263context.Features.Set<IHttpWebSocketFeature>(new TestWebSocketConnectionFeature()); 300context.Features.Set<IHttpResponseFeature>(new ResponseFeature()); 853context.Features.Set<IHttpResponseFeature>(new ResponseFeature()); 2265context.Features.Set<IHttpResponseFeature>(new ResponseFeature()); 2291context.Features.Set<IHttpResponseFeature>(new ResponseFeature()); 2320context.Features.Set<IHttpResponseFeature>(new ResponseFeature()); 2349context.Features.Set<IHttpResponseFeature>(new ResponseFeature()); 2929context.Features.Set<IHttpRequestLifetimeFeature>(lifetimeFeature); 3125context.Features.Set<IHttpActivityFeature>(activityFeature); 3521c.Features.Set<IHttpRequestTimeoutFeature>(new HttpRequestTimeoutFeature()); 3579context.Features.Set<IHttpRequestTimeoutFeature>(new HttpRequestTimeoutFeature()); 3586context.Features.Set<IHttpRequestTimeoutFeature>(new HttpRequestTimeoutFeature()); 3691context.Features.Set<IHttpResponseFeature>(new ResponseFeature()); 3733context.Features.Set<IHttpResponseFeature>(new ResponseFeature()); 3755context.Features.Set<IHttpWebSocketFeature>(new TestWebSocketConnectionFeature(sync));
ServerSentEventsTests.cs (1)
50context.Features.Set<IHttpResponseBodyFeature>(feature);
WebSocketsTests.cs (1)
375context.Features.Set<IHttpWebSocketFeature>(feature);
Microsoft.AspNetCore.Http.Extensions.Tests (65)
RequestDelegateFactoryTests.cs (1)
1225httpContext.Features.Set<IHttpRequestLifetimeFeature>(new HttpRequestLifetimeFeature());
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
222httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true));
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (5)
622httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 649httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 676httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 703httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 730httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true));
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (2)
217httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 273httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true));
RequestDelegateGenerator\RequestDelegateCreationTests.Filters.cs (2)
236httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 239httpContext.Features.Set<IEndpointFeature>(new EndpointFeature { Endpoint = endpoint });
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (26)
37httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 72httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 107httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 145httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 183httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 224httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 261httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 297httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 324httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 371httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 404httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 454httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 493httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 500httpContext.Features.Set<ITlsConnectionFeature>(new TlsConnectionFeature(clientCertificate)); 552httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 599httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 646httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 675httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 708httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 738httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 768httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 831httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 875httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 933httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 965httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 1002httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true));
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (9)
85httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(requestData is not null)); 105httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(false)); 235httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 276httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 316httpContext.Features.Set<IRequestBodyPipeFeature>(new PipeRequestBodyFeature(pipeReader)); 320httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 357httpContext.Features.Set<IRequestBodyPipeFeature>(new PipeRequestBodyFeature(pipeReader)); 361httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 426httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true));
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBodyOrService.cs (1)
200httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(false));
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (6)
386httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 484httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 520httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 561httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 600httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 640httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true));
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
58httpContext.Features.Set<IHttpRequestLifetimeFeature>(new HttpRequestLifetimeFeature());
RequestDelegateGenerator\RuntimeCreationTests.ComplexFormBinding.cs (7)
32httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 68httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 100httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 137httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 174httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 209httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true)); 246httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true));
ResponseExtensionTests.cs (1)
29context.Features.Set<IHttpResponseFeature>(new StartedResponseFeature());
SendFileResponseExtensionsTests.cs (3)
24context.Features.Set<IHttpResponseBodyFeature>(fakeFeature); 66context.Features.Set<IHttpResponseBodyFeature>(fakeFeature); 92context.Features.Set<IHttpResponseBodyFeature>(fakeFeature);
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
222httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(true));
Microsoft.AspNetCore.Http.Results.Tests (21)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (9)
41httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 73httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 105httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 132httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 161httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 277httpContext.Features.Set(sendFileMock.Object); 297httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 330httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 351httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile);
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (12)
52httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 89httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 126httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 159httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 195httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 265httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 296httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 328httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 365httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 383httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 405httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 428httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature);
Microsoft.AspNetCore.Http.Tests (39)
ApplicationBuilderTests.cs (1)
33httpContext.Features.Set<IHttpResponseFeature>(responseFeature);
DefaultHttpContextTests.cs (4)
37context.Features.Set<ISessionFeature>(feature); 69context.Features.Set<ISessionFeature>(feature); 216context.Features.Set<IHttpResponseFeature>(responseFeature); 243context.Features.Set<IHttpResponseFeature>(responseFeature);
Features\FormFeatureTests.cs (31)
16context.Features.Set<IHttpResponseFeature>(responseFeature); 21context.Features.Set<IFormFeature>(formFeature); 54context.Features.Set<IHttpResponseFeature>(responseFeature); 59context.Features.Set<IFormFeature>(formFeature); 89context.Features.Set<IHttpResponseFeature>(responseFeature); 98context.Features.Set<IRequestBodyPipeFeature>(mockFeature); 101context.Features.Set<IFormFeature>(formFeature); 204context.Features.Set<IHttpResponseFeature>(responseFeature); 209context.Features.Set<IFormFeature>(formFeature); 239context.Features.Set<IHttpResponseFeature>(responseFeature); 244context.Features.Set<IFormFeature>(formFeature); 276context.Features.Set<IHttpResponseFeature>(responseFeature); 281context.Features.Set<IFormFeature>(formFeature); 324context.Features.Set<IHttpResponseFeature>(responseFeature); 329context.Features.Set<IFormFeature>(formFeature); 361context.Features.Set<IHttpResponseFeature>(responseFeature); 366context.Features.Set<IFormFeature>(formFeature); 409context.Features.Set<IHttpResponseFeature>(responseFeature); 414context.Features.Set<IFormFeature>(formFeature); 461context.Features.Set<IHttpResponseFeature>(responseFeature); 466context.Features.Set<IFormFeature>(formFeature); 485context.Features.Set<IHttpResponseFeature>(responseFeature); 490context.Features.Set<IFormFeature>(formFeature); 509context.Features.Set<IHttpResponseFeature>(responseFeature); 514context.Features.Set<IFormFeature>(formFeature); 533context.Features.Set<IHttpResponseFeature>(responseFeature); 538context.Features.Set<IFormFeature>(formFeature); 558context.Features.Set<IHttpResponseFeature>(responseFeature); 563context.Features.Set<IFormFeature>(formFeature); 601context.Features.Set<IHttpResponseFeature>(responseFeature); 606context.Features.Set<IFormFeature>(formFeature);
Internal\DefaultHttpRequestTests.cs (2)
233context.Features.Set<IRouteValuesFeature>(customRouteValuesFeature); 238context.Features.Set<IRouteValuesFeature>(null);
ResponseCookiesTest.cs (1)
36features.Set<IServiceProvidersFeature>(new ServiceProvidersFeature() { RequestServices = services.BuildServiceProvider() });
Microsoft.AspNetCore.HttpLogging (4)
HttpLoggingMiddleware.cs (4)
197context.Features.Set<IHttpUpgradeFeature>(loggableUpgradeFeature); 210context.Features.Set<IHttpResponseBodyFeature>(responseBufferingStream); 272context.Features.Set(originalBodyFeature); 284context.Features.Set(originalUpgradeFeature);
Microsoft.AspNetCore.HttpLogging.Tests (7)
HttpLoggingMiddlewareTests.cs (7)
1215httpContext.Features.Set<IHttpUpgradeFeature>(upgradeFeatureMock.Object); 1265httpContext.Features.Set<IHttpUpgradeFeature>(upgradeFeatureMock.Object); 1319httpContext.Features.Set<IHttpUpgradeFeature>(upgradeFeatureMock.Object); 1362httpContext.Features.Set<IHttpUpgradeFeature>(upgradeFeatureMock.Object); 1397httpContext.Features.Set<IHttpUpgradeFeature>(upgradeFeatureMock.Object); 1440httpContext.Features.Set<IHttpUpgradeFeature>(upgradeFeatureMock.Object); 1472httpContext.Features.Set<IHttpUpgradeFeature>(upgradeFeatureMock.Object);
Microsoft.AspNetCore.HttpOverrides (1)
CertificateForwardingMiddleware.cs (1)
52httpContext.Features.Set<ITlsConnectionFeature>(new CertificateForwardingFeature(_logger, header, _options));
Microsoft.AspNetCore.HttpsPolicy.Tests (6)
HttpsPolicyTests.cs (1)
62server.Features.Set<IServerAddressesFeature>(new ServerAddressesFeature());
HttpsRedirectionMiddlewareTests.cs (5)
214server.Features.Set<IServerAddressesFeature>(new ServerAddressesFeature()); 258server.Features.Set<IServerAddressesFeature>(new ServerAddressesFeature()); 301server.Features.Set<IServerAddressesFeature>(new ServerAddressesFeature()); 344server.Features.Set<IServerAddressesFeature>(new ServerAddressesFeature()); 439server.Features.Set<IServerAddressesFeature>(null);
Microsoft.AspNetCore.Localization (1)
RequestLocalizationMiddleware.cs (1)
110context.Features.Set<IRequestCultureFeature>(new RequestCultureFeature(requestCulture, winningProvider));
Microsoft.AspNetCore.Mvc.Core (2)
Filters\MiddlewareFilter.cs (1)
35httpContext.Features.Set<IMiddlewareFilterFeature>(feature);
Filters\RequestFormLimitsFilter.cs (1)
40features.Set<IFormFeature>(new FormFeature(context.HttpContext.Request, FormOptions));
Microsoft.AspNetCore.Mvc.Core.Test (38)
Filters\DisableRequestSizeLimitFilterTest.cs (4)
23authorizationFilterContext.HttpContext.Features.Set<IHttpMaxRequestBodySizeFeature>(httpMaxRequestBodySize); 42authorizationFilterContext.HttpContext.Features.Set<IHttpMaxRequestBodySizeFeature>(httpMaxRequestBodySize); 84authorizationFilterContext.HttpContext.Features.Set<IHttpMaxRequestBodySizeFeature>(httpMaxRequestBodySize); 105authorizationFilterContext.HttpContext.Features.Set<IHttpMaxRequestBodySizeFeature>(httpMaxRequestBodySize);
Filters\RequestFormLimitsFilterTest.cs (4)
25authorizationFilterContext.HttpContext.Features.Set<IFormFeature>(null); 45authorizationFilterContext.HttpContext.Features.Set<IFormFeature>(oldFormFeature); 91authorizationFilterContext.HttpContext.Features.Set<IFormFeature>(null); 116authorizationFilterContext.HttpContext.Features.Set<IFormFeature>(
Filters\RequestSizeLimitFilterTest.cs (4)
24authorizationFilterContext.HttpContext.Features.Set<IHttpMaxRequestBodySizeFeature>(httpMaxRequestBodySize); 45authorizationFilterContext.HttpContext.Features.Set<IHttpMaxRequestBodySizeFeature>(httpMaxRequestBodySize); 89authorizationFilterContext.HttpContext.Features.Set<IHttpMaxRequestBodySizeFeature>(httpMaxRequestBodySize); 111authorizationFilterContext.HttpContext.Features.Set<IHttpMaxRequestBodySizeFeature>(httpMaxRequestBodySize);
Filters\ResponseCacheFilterExecutorTest.cs (1)
402context.HttpContext.Features.Set<IResponseCachingFeature>(new ResponseCachingFeature());
ResponseCacheAttributeTest.cs (1)
213context.HttpContext.Features.Set<IResponseCachingFeature>(new ResponseCachingFeature());
Routing\UrlHelperTestBase.cs (3)
968urlHelper.ActionContext.HttpContext.Features.Set<IRouteValuesFeature>(new RouteValuesFeature 1007urlHelper.ActionContext.HttpContext.Features.Set<IRouteValuesFeature>(new RouteValuesFeature 1047urlHelper.ActionContext.HttpContext.Features.Set<IRouteValuesFeature>(new RouteValuesFeature
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (9)
41httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 73httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 105httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 132httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 161httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 277httpContext.Features.Set(sendFileMock.Object); 297httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 330httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 351httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile);
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (12)
52httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 89httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 126httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 159httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 195httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 265httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 296httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 328httpContext.Features.Set<IHttpResponseBodyFeature>(sendFile); 365httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 383httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 405httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature); 428httpContext.Features.Set<IHttpResponseBodyFeature>(sendFileFeature);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (10)
XmlDataContractSerializerInputFormatterTest.cs (5)
148httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 212httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 247httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 279httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 338httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature());
XmlSerializerInputFormatterTest.cs (5)
53httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 90httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 126httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 162httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 204httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature());
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
AntiforgeryMiddlewareTest.cs (1)
105context.Features.Set<IHttpMaxRequestBodySizeFeature>(new FakeHttpMaxRequestBodySizeFeature(5_000_000));
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
ModelBindingTestHelper.cs (2)
153httpContext.Features.Set<IHttpRequestLifetimeFeature>(new CancellableRequestLifetimeFeature()); 154httpContext.Features.Set<IHttpRequestBodyDetectionFeature>(new NonZeroContentLengthRequestBodyDetectionFeature(httpContext));
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (7)
NewtonsoftJsonInputFormatterTest.cs (5)
40httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 76httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 112httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 504httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 547httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature());
NewtonsoftJsonPatchInputFormatterTest.cs (2)
39httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature()); 76httpContext.Features.Set<IHttpResponseFeature>(new TestResponseFeature());
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Filters\ControllerViewDataAttributeFilter.cs (1)
26context.HttpContext.Features.Set<IViewDataValuesProviderFeature>(this);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (4)
Filters\SaveTempDataFilterTest.cs (1)
364httpContext.Features.Set<IHttpResponseFeature>(responseFeature);
SessionStateTempDataProviderTest.cs (1)
83httpContext.Features.Set<ISessionFeature>(new SessionFeature() { Session = new TestSession() });
SkipStatusCodePagesAttributeTest.cs (1)
22resourceExecutingContext.HttpContext.Features.Set<IStatusCodePagesFeature>(statusCodePagesFeature);
ViewComponentTests.cs (1)
241httpContext.Features.Set<ISessionFeature>(new SessionFeature() { Session = new TestSession() });
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheMiddleware.cs (1)
505context.Features.Set<IOutputCacheFeature?>(null);
Microsoft.AspNetCore.Owin (1)
OwinExtensions.cs (1)
140context.Features.Set<IOwinEnvironmentFeature>(new OwinEnvironmentFeature() { Environment = env });
Microsoft.AspNetCore.RequestDecompression.Tests (7)
RequestDecompressionMiddlewareTests.cs (7)
219context.Features.Set<IHttpMaxRequestBodySizeFeature>( 289context.Features.Set<IHttpMaxRequestBodySizeFeature>( 365context.Features.Set<IHttpMaxRequestBodySizeFeature>( 460context.Features.Set<IEndpointFeature>( 462context.Features.Set<IHttpMaxRequestBodySizeFeature>( 546context.Features.Set<IHttpMaxRequestBodySizeFeature>( 704context.Features.Set<IHttpMaxRequestBodySizeFeature>(
Microsoft.AspNetCore.ResponseCaching (2)
ResponseCachingMiddleware.cs (2)
398context.Features.Set<IResponseCachingFeature>(new ResponseCachingFeature()); 417context.Features.Set<IResponseCachingFeature?>(null);
Microsoft.AspNetCore.ResponseCaching.Tests (1)
ResponseCachingMiddlewareTests.cs (1)
919context.Features.Set<IHttpResponseFeature>(new FakeResponseFeature());
Microsoft.AspNetCore.ResponseCompression (4)
ResponseCompressionMiddleware.cs (4)
54context.Features.Set<IHttpResponseBodyFeature>(compressionBody); 55context.Features.Set<IHttpsCompressionFeature>(compressionBody); 64context.Features.Set(originalBodyFeature); 65context.Features.Set(originalCompressionFeature);
Microsoft.AspNetCore.ResponseCompression.Tests (3)
ResponseCompressionMiddlewareTest.cs (3)
1041context.Features.Set<IHttpResponseBodyFeature>(fakeSendFile); 1091context.Features.Set<IHttpResponseBodyFeature>(fakeSendFile); 1141context.Features.Set<IHttpResponseBodyFeature>(fakeSendFile);
Microsoft.AspNetCore.Rewrite.Tests (3)
IISUrlRewrite\ServerVariableTests.cs (2)
63httpContext.Features.Set<IServerVariablesFeature>(new TestServerVariablesFeature(new Dictionary<string, string> 111httpContext.Features.Set<IServerVariablesFeature>(new TestServerVariablesFeature(new Dictionary<string, string>
PatternSegments\ServerProtocolSegmentTests.cs (1)
18context.HttpContext.Features.Set<IHttpRequestFeature>(new HttpRequestFeature { Protocol = "http" });
Microsoft.AspNetCore.Routing (1)
RouterMiddleware.cs (1)
62httpContext.Features.Set<IRoutingFeature>(routingFeature);
Microsoft.AspNetCore.Security.Microbenchmarks (1)
AuthorizationMiddlewareBenchmark.cs (1)
31_httpContextHasEndpoint.Features.Set<IEndpointFeature>(feature);
Microsoft.AspNetCore.Server.HttpSys (2)
MessagePump.cs (2)
45Features.Set<IServerAddressesFeature>(_serverAddresses); 49Features.Set<IServerDelegationFeature>(this);
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpServer.cs (2)
80Features.Set<IServerAddressesFeature>(_serverAddressesFeature); 84Features.Set<IIISEnvironmentFeature>(iisEnvFeature);
Microsoft.AspNetCore.Server.IISIntegration (3)
IISMiddleware.cs (3)
140httpContext.Features.Set<ITlsConnectionFeature>(new ForwardedTlsConnectionFeature(_logger, header)); 151httpContext.Features.Set(user); 164httpContext.Features.Set<IHttpUpgradeFeature?>(null);
Microsoft.AspNetCore.Server.Kestrel.Core (17)
Internal\Infrastructure\KestrelConnectionOfT.cs (5)
27connectionContext.Features.Set<IConnectionHeartbeatFeature>(this); 28connectionContext.Features.Set<IConnectionCompleteFeature>(this); 29connectionContext.Features.Set<IConnectionLifetimeNotificationFeature>(this); 30connectionContext.Features.Set<IConnectionMetricsContextFeature>(this); 51connectionContext.Features.Set<IConnectionMetricsTagsFeature>(metricsTagsFeature);
Internal\KestrelServerImpl.cs (1)
70Features.Set<IServerAddressesFeature>(_serverAddresses);
Internal\SniOptionsSelector.cs (1)
148connection.Features.Set(new HttpProtocolsFeature(sniOptions.HttpProtocols));
Internal\WebTransport\WebTransportStream.cs (3)
56_features.Set<IStreamDirectionFeature>(this); 57_features.Set<IStreamIdFeature>(this); 58_features.Set<IConnectionItemsFeature>(this);
Middleware\ConnectionLimitMiddleware.cs (1)
47connection.Features.Set<IDecrementConcurrentConnectionCountFeature>(releasor);
Middleware\HttpsConnectionMiddleware.cs (6)
151context.Features.Set<ITlsConnectionFeature>(feature); 152context.Features.Set<ITlsHandshakeFeature>(feature); 153context.Features.Set<ITlsApplicationProtocolFeature>(feature); 154context.Features.Set<ISslStreamFeature>(feature); 155context.Features.Set<SslStream>(sslStream); // Anti-pattern, but retain for back compat 444context.Features.Set(sslStream);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (10)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (10)
1010Features.Set<IConnectionLifetimeNotificationFeature>(this); 1011Features.Set<IConnectionHeartbeatFeature>(this); 1012Features.Set<IProtocolErrorCodeFeature>(this); 1014Features.Set<IConnectionMetricsTagsFeature>(this); 1155Features.Set<IStreamDirectionFeature>(this); 1156Features.Set<IStreamIdFeature>(this); 1157Features.Set<IStreamAbortFeature>(this); 1158Features.Set<IProtocolErrorCodeFeature>(this); 1159Features.Set<IPersistentStateFeature>(this); 1160Features.Set<IStreamClosedFeature>(this);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Internal\NamedPipeConnection.cs (1)
55Features.Set<IConnectionNamedPipeFeature>(this);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
QuicTestHelpers.cs (1)
103connection?.Features.Set<IConnectionHeartbeatFeature>(new TestConnectionHeartbeatFeature());
Microsoft.AspNetCore.Session (2)
SessionMiddleware.cs (2)
86context.Features.Set<ISessionFeature>(feature); 94context.Features.Set<ISessionFeature?>(null);
Microsoft.AspNetCore.SignalR.Client.Tests (4)
HubConnectionTests.cs (3)
380testConnection.Features.Set<IConnectionInherentKeepAliveFeature>(new TestKeepAliveFeature() { HasInherentKeepAlive = true }); 889innerConnection.Features.Set<IStatefulReconnectFeature>(reconnectFeature); 921innerConnection.Features.Set<IStatefulReconnectFeature>(reconnectFeature);
TestConnection.cs (1)
61Features.Set<IConnectionInherentKeepAliveFeature>(this);
Microsoft.AspNetCore.SignalR.Microbenchmarks (3)
HubConnectionReceiveBenchmark.cs (1)
81connection.Features.Set<IConnectionInherentKeepAliveFeature>(new TestConnectionInherentKeepAliveFeature());
HubConnectionSendBenchmark.cs (1)
61connection.Features.Set<IConnectionInherentKeepAliveFeature>(new TestConnectionInherentKeepAliveFeature());
HubConnectionStartBenchmark.cs (1)
47connection.Features.Set<IConnectionInherentKeepAliveFeature>(new TestConnectionInherentKeepAliveFeature());
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (2)
49Connection.Features.Set<ITransferFormatFeature>(this); 50Connection.Features.Set<IConnectionHeartbeatFeature>(this);
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
RedisHubLifetimeManager.cs (1)
96connection.Features.Set<IRedisFeature>(feature);
Microsoft.AspNetCore.SignalR.Tests (7)
HubConnectionHandlerTests.cs (7)
2284client.Connection.Features.Set<IConnectionLifetimeNotificationFeature>(new TestConnectionLifetimeNotification()); 2352client.Connection.Features.Set<IHttpContextFeature>(httpConnectionContext); 2623client.Connection.Features.Set<IHttpContextFeature>(feature); 5098client2.Connection.Features.Set<IHttpContextFeature>(feature); 5205client.Connection.Features.Set<IStatefulReconnectFeature>(new EmptyReconnectFeature()); 5250client.Connection.Features.Set<IStatefulReconnectFeature>(reconnectFeature); 5314client.Connection.Features.Set<IStatefulReconnectFeature>(reconnectFeature);
Microsoft.AspNetCore.SignalR.Tests.Utils (2)
TestClient.cs (2)
49Connection.Features.Set<ITransferFormatFeature>(this); 50Connection.Features.Set<IConnectionHeartbeatFeature>(this);
Microsoft.AspNetCore.StaticAssets (2)
Development\StaticAssetDevelopmentRuntimeHandler.cs (2)
52context.Features.Set<IHttpResponseBodyFeature>(new RuntimeStaticAssetResponseBodyFeature(originalFeature, context, asset)); 56context.Features.Set(originalFeature);
Microsoft.AspNetCore.StaticFiles.Tests (3)
StaticFileContextTest.cs (2)
74httpContext.Features.Set<IHttpsCompressionFeature>(httpsCompressionFeature); 103httpContext.Features.Set<IHttpsCompressionFeature>(httpsCompressionFeature);
StaticFileMiddlewareTests.cs (1)
100ctx.Features.Set(mockSendFile.Object);
Microsoft.AspNetCore.TestHost (9)
ClientHandler.cs (1)
155context.Features.Set<IHttpRequestBodyDetectionFeature>(new RequestBodyDetectionFeature(canHaveBody));
HttpContextBuilder.cs (7)
51_httpContext.Features.Set<IHttpBodyControlFeature>(this); 52_httpContext.Features.Set<IHttpResponseFeature>(_responseFeature); 53_httpContext.Features.Set<IHttpResponseBodyFeature>(_responseFeature); 54_httpContext.Features.Set<IHttpRequestLifetimeFeature>(_requestLifetimeFeature); 55_httpContext.Features.Set<IHttpResponseTrailersFeature>(_responseTrailersFeature); 56_httpContext.Features.Set<IHttpUpgradeFeature>(new UpgradeFeature()); 95_httpContext.Features.Set<IHttpResetFeature>(this);
WebSocketClient.cs (1)
92context.Features.Set<IHttpWebSocketFeature>(webSocketFeature);
Microsoft.AspNetCore.TestHost.Tests (2)
TestServerTests.cs (2)
484context.Features.Set<IServiceProvidersFeature>(this); 526context.Features.Set<IServiceProvidersFeature>(this);
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
3107Features.Set<IServerAddressesFeature>(mockAddressesFeature);
Microsoft.AspNetCore.WebSockets (1)
WebSocketMiddleware.cs (1)
64context.Features.Set<IHttpWebSocketFeature>(webSocketFeature);
Microsoft.AspNetCore.WebSockets.Tests (2)
Http2WebSocketTests.cs (1)
40httpContext.Features.Set<IHttpExtendedConnectFeature>(new ConnectFeature()
WebSocketMiddlewareTests.cs (1)
781context.Features.Set<IHttpRequestTimeoutFeature>(new HttpRequestTimeoutFeature());
Microsoft.Extensions.Features (1)
FeatureReferences.cs (1)
126Collection.Set(cached);
Microsoft.Extensions.ServiceDiscovery (2)
Configuration\ConfigurationServiceEndpointProvider.cs (2)
232serviceEndpoint.Features.Set<IServiceEndpointProvider>(this); 235serviceEndpoint.Features.Set<IHostNameFeature>(this);