Base:
property
RequestServices
Microsoft.AspNetCore.Http.HttpContext.RequestServices
310 writes to RequestServices
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTest.cs (1)
1414httpContext.RequestServices = GetServices();
Microsoft.AspNetCore.Authentication.Core.Test (15)
AuthenticationServiceTests.cs (13)
20context.RequestServices = services; 38context.RequestServices = services; 59context.RequestServices = services; 74context.RequestServices = services; 89context.RequestServices = services; 104context.RequestServices = services; 121context.RequestServices = services; 144context.RequestServices = services; 163context.RequestServices = services; 183context.RequestServices = services; 201context.RequestServices = services; 219context.RequestServices = services; 238context.RequestServices = services;
TokenExtensionTests.cs (2)
132context.RequestServices = services.BuildServiceProvider(); 145context.RequestServices = services.BuildServiceProvider();
Microsoft.AspNetCore.Authentication.Test (25)
AuthenticationMiddlewareTests.cs (1)
220httpContext.RequestServices = serviceProvider;
OpenIdConnect\OpenIdConnectConfigurationTests.cs (9)
48context.RequestServices = sp; 95context.RequestServices = sp; 124context.RequestServices = sp; 164context.RequestServices = sp; 204context.RequestServices = sp; 244context.RequestServices = sp; 287context.RequestServices = sp; 342context.RequestServices = sp; 402context.RequestServices = sp;
PolicyTests.cs (5)
76context.RequestServices = sp; 132context.RequestServices = sp; 193context.RequestServices = sp; 245context.RequestServices = sp; 302context.RequestServices = sp;
SharedAuthenticationTests.cs (10)
43context.RequestServices = sp; 107context.RequestServices = sp; 149context.RequestServices = sp; 189context.RequestServices = sp; 239context.RequestServices = sp; 268context.RequestServices = sp; 307context.RequestServices = sp; 349context.RequestServices = sp; 418context.RequestServices = sp; 492context.RequestServices = sp;
Microsoft.AspNetCore.Authorization.Test (6)
AuthorizationAppBuilderExtensionsTests.cs (1)
33httpContext.RequestServices = services;
AuthorizationMiddlewareResultHandlerTests.cs (1)
142return new DefaultHttpContext { RequestServices = serviceProvider };
AuthorizationMiddlewareTests.cs (1)
1052httpContext.RequestServices = serviceProvider;
PolicyEvaluatorTests.cs (3)
20context.RequestServices = services.BuildServiceProvider(); 37context.RequestServices = services.BuildServiceProvider(); 56context.RequestServices = services.BuildServiceProvider();
Microsoft.AspNetCore.Components.Endpoints.Tests (6)
EndpointHtmlRendererTest.cs (4)
673var context = new DefaultHttpContext() { RequestServices = scopedProvider }; 887httpContext.RequestServices = new ServiceCollection() 916httpContext.RequestServices = new ServiceCollection() 1009httpContext.RequestServices = new ServiceCollection()
RazorComponentEndpointInvokerTest.cs (1)
45context.RequestServices = services;
RazorComponentResultTest.cs (1)
471var result = new DefaultHttpContext { RequestServices = serviceCollection.BuildServiceProvider() };
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Latency\AddServerTimingHeaderMiddlewareTests.cs (1)
35RequestServices = serviceProvider
Latency\RequestLatencyTelemetryMiddlewareTests.cs (1)
227httpContextMock.RequestServices = serviceProviderMock.Object;
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerMiddlewareTest.cs (1)
485RequestServices = new TestServiceProvider()
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (2)
Infrastructure\TestHelpers.cs (1)
28httpContext.RequestServices = serviceProvider;
JsonTranscodingServerCallContextTests.cs (1)
65httpContext.RequestServices = serviceProvider;
Microsoft.AspNetCore.HeaderParsing.Tests (2)
HeaderParsingExtensionsTests.cs (1)
128RequestServices = services.BuildServiceProvider()
HeaderParsingFeatureTests.cs (1)
32=> _context ??= new DefaultHttpContext { RequestServices = _services.BuildServiceProvider() };
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
UseMiddlewareTest.cs (3)
231context.RequestServices = sp; 249context.RequestServices = sp; 271context.RequestServices = sp;
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
765newHttpContext.RequestServices = connection.ServiceScope.Value.ServiceProvider;
Microsoft.AspNetCore.Http.Connections.Tests (6)
HttpConnectionDispatcherTests.cs (6)
535context.RequestServices = services.BuildServiceProvider(); 782context.RequestServices = services.BuildServiceProvider(); 1841context.RequestServices = sp; 1893context.RequestServices = sp; 3704context.RequestServices = services.BuildServiceProvider(); 3746context.RequestServices = serviceCollection.BuildServiceProvider();
Microsoft.AspNetCore.Http.Extensions.Tests (9)
ProblemDetailsDefaultWriterTest.cs (1)
681RequestServices = CreateServices()
RequestDelegateFactoryTests.cs (7)
870httpContext.RequestServices = mock.Object; 1182httpContext.RequestServices = requestScoped.ServiceProvider; 1342httpContext.RequestServices = new ServiceCollection() 1374httpContext.RequestServices = new ServiceCollection() 1403httpContext.RequestServices = new ServiceCollection() 1745httpContext.RequestServices = services; 3262RequestServices = new ServiceCollection().AddSingleton(LoggerFactory).BuildServiceProvider(),
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
200httpContext.RequestServices = serviceProvider ?? CreateServiceProvider();
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
200httpContext.RequestServices = serviceProvider ?? CreateServiceProvider();
Microsoft.AspNetCore.Http.Results.Tests (65)
AcceptedAtRouteOfTResultTests.cs (1)
215httpContext.RequestServices = CreateServices(linkGenerator);
AcceptedAtRouteResultTests.cs (1)
125httpContext.RequestServices = CreateServices(linkGenerator);
AcceptedOfTResultTests.cs (1)
139httpContext.RequestServices = CreateServices();
AcceptedResultTests.cs (1)
82httpContext.RequestServices = CreateServices();
BadRequestOfTResultTests.cs (3)
52RequestServices = CreateServices(), 70RequestServices = CreateServices(), 93RequestServices = CreateServices(),
BadRequestResultTests.cs (1)
35RequestServices = CreateServices(),
ChallengeResultTests.cs (1)
58httpContext.RequestServices = CreateServices()
ConflictOfTResultTests.cs (2)
51RequestServices = CreateServices(), 69RequestServices = CreateServices(),
ConflictResultTests.cs (1)
36RequestServices = CreateServices(),
ContentResultTests.cs (1)
183httpContext.RequestServices = services.BuildServiceProvider();
CreatedAtRouteOfTResultTests.cs (1)
184httpContext.RequestServices = CreateServices(linkGenerator);
CreatedAtRouteResultTests.cs (1)
130httpContext.RequestServices = CreateServices(linkGenerator);
CreatedOfTResultTests.cs (1)
181httpContext.RequestServices = CreateServices();
CreatedResultTests.cs (1)
118httpContext.RequestServices = CreateServices();
EmptyResultTests.cs (1)
42httpContext.RequestServices = CreateServices();
ForbidResultTests.cs (1)
125httpContext.RequestServices = CreateServices()
HttpResultsHelperTests.cs (1)
235RequestServices = CreateServices(),
InternalServerErrorOfTResultTests.cs (3)
52RequestServices = CreateServices(), 70RequestServices = CreateServices(), 93RequestServices = CreateServices(),
InternalServerErrorResultTests.cs (1)
35RequestServices = CreateServices(),
JsonResultTests.cs (9)
25RequestServices = CreateServices(), 43RequestServices = CreateServices(), 61RequestServices = CreateServices(), 89RequestServices = CreateServices(), 122RequestServices = CreateServices(), 151RequestServices = CreateServices(), 183RequestServices = CreateServices(), 211RequestServices = CreateServices(), 231RequestServices = CreateServices(),
LocalRedirectResultTests.cs (1)
131httpContext.RequestServices = GetServiceProvider();
NoContentResultTests.cs (1)
102httpContext.RequestServices = services.BuildServiceProvider();
NotFoundOfTResultTests.cs (1)
144httpContext.RequestServices = CreateServices();
NotFoundResultTests.cs (1)
93httpContext.RequestServices = CreateServices();
OkOfTResultTests.cs (2)
51RequestServices = CreateServices(), 72RequestServices = CreateServices()
OkResultTests.cs (1)
34RequestServices = CreateServices()
ProblemResultTests.cs (6)
25RequestServices = CreateServices(), 57RequestServices = services, 86RequestServices = CreateServices(), 118RequestServices = CreateServices(), 150RequestServices = CreateServices(), 179RequestServices = CreateServices(),
PushStreamResultTests.cs (1)
19RequestServices = new ServiceCollection().AddLogging().BuildServiceProvider()
RedirectToRouteResultTests.cs (2)
19httpContext.RequestServices = CreateServices(null).BuildServiceProvider(); 103httpContext.RequestServices = services.BuildServiceProvider();
ResultsOfTTests.cs (1)
67RequestServices = services.BuildServiceProvider()
SignInResultTests.cs (1)
91httpContext.RequestServices = CreateServices()
SignOutResultTests.cs (1)
90httpContext.RequestServices = CreateServices()
src\Shared\ResultsTests\FileContentResultTestBase.cs (1)
366httpContext.RequestServices = services.BuildServiceProvider();
src\Shared\ResultsTests\FileStreamResultTestBase.cs (1)
454httpContext.RequestServices = services.BuildServiceProvider();
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
471httpContext.RequestServices = services.BuildServiceProvider();
src\Shared\ResultsTests\RedirectResultTestBase.cs (1)
73httpContext.RequestServices = GetServiceProvider();
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
503httpContext.RequestServices = services.BuildServiceProvider();
StatusCodeResultTests.cs (1)
59httpContext.RequestServices = services.BuildServiceProvider();
UnauthorizedResultTests.cs (1)
69httpContext.RequestServices = services.BuildServiceProvider();
UnprocessableEntityOfTResultTests.cs (2)
50RequestServices = CreateServices(), 68RequestServices = CreateServices(),
UnprocessableEntityResultTests.cs (1)
35RequestServices = CreateServices(),
Utf8ContentResultTests.cs (1)
101httpContext.RequestServices = services.BuildServiceProvider();
ValidationProblemResultTests.cs (2)
28RequestServices = CreateServices(), 61RequestServices = services,
Microsoft.AspNetCore.Http.Tests (1)
DefaultHttpContextTests.cs (1)
198context.RequestServices = serviceProvider;
Microsoft.AspNetCore.Mvc.Core.Test (76)
AcceptedAtActionResultTests.cs (1)
251httpContext.RequestServices = CreateServices(formatter);
AcceptedAtRouteResultTests.cs (1)
159httpContext.RequestServices = CreateServices(formatter);
AcceptedResultTests.cs (1)
116httpContext.RequestServices = CreateServices(formatter);
ContentResultTest.cs (1)
279httpContext.RequestServices = services.BuildServiceProvider();
ControllerBaseTest.cs (1)
3202RequestServices = services.BuildServiceProvider()
Controllers\ControllerActivatorProviderTest.cs (1)
56RequestServices = serviceProvider,
Controllers\ControllerBinderDelegateProviderTest.cs (1)
1259RequestServices = services.BuildServiceProvider()
Controllers\DefaultControllerActivatorTest.cs (2)
27RequestServices = serviceProvider.Object 127RequestServices = serviceProvider.Object
Controllers\DefaultControllerFactoryTest.cs (6)
30RequestServices = GetServices(), 64RequestServices = GetServices(), 91RequestServices = GetServices(), 118RequestServices = GetServices(), 145RequestServices = GetServices(), 173RequestServices = GetServices(),
Controllers\ServiceBasedControllerActivatorTest.cs (2)
24RequestServices = serviceProvider.Object 52RequestServices = Mock.Of<IServiceProvider>()
CreatedAtActionResultTests.cs (1)
80httpContext.RequestServices = CreateServices();
CreatedAtRouteResultTests.cs (1)
94httpContext.RequestServices = CreateServices();
CreatedResultTests.cs (1)
127httpContext.RequestServices = CreateServices();
FileResultHelperTest.cs (3)
84httpContext.RequestServices = provider; 125httpContext.RequestServices = new ServiceCollection().BuildServiceProvider(); 473httpContext.RequestServices = services.BuildServiceProvider();
Filters\MiddlewareFilterTest.cs (1)
313RequestServices = services.BuildServiceProvider()
Formatters\TextOutputFormatterTests.cs (1)
219new DefaultHttpContext() { RequestServices = new ServiceCollection().BuildServiceProvider() },
HttpActionResultTests.cs (1)
33RequestServices = CreateServices().BuildServiceProvider()
HttpNotFoundObjectResultTest.cs (1)
60httpContext.RequestServices = CreateServices();
HttpOkObjectResultTest.cs (1)
55RequestServices = CreateServices(),
HttpOkResultTest.cs (1)
30httpContext.RequestServices = CreateServices().BuildServiceProvider();
HttpStatusCodeResultTests.cs (1)
60httpContext.RequestServices = services.BuildServiceProvider();
Infrastructure\ControllerActionInvokerTest.cs (1)
1717httpContext.RequestServices = services.BuildServiceProvider();
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (1)
208RequestServices = CreateServices()
Infrastructure\JsonResultExecutorTestBase.cs (1)
486httpContext.RequestServices = services.BuildServiceProvider();
Infrastructure\ObjectResultExecutorTest.cs (1)
472httpContext.RequestServices = services.BuildServiceProvider();
LocalRedirectResultTest.cs (1)
149httpContext.RequestServices = GetServiceProvider();
ModelBinding\Binders\BinderTypeModelBinderTest.cs (1)
77HttpContext = new DefaultHttpContext() { RequestServices = new ServiceCollection().BuildServiceProvider() },
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (2)
470RequestServices = new ServiceCollection().BuildServiceProvider(), 497RequestServices = new ServiceCollection().BuildServiceProvider(),
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (2)
651RequestServices = new ServiceCollection().BuildServiceProvider(), 678RequestServices = new ServiceCollection().BuildServiceProvider(),
ModelBinding\Binders\HeaderModelBinderTests.cs (1)
366RequestServices = serviceProvider
ModelBinding\Binders\ServicesModelBinderTest.cs (1)
48RequestServices = services.BuildServiceProvider(),
ModelBinding\DefaultModelBindingContextTest.cs (1)
164RequestServices = services.BuildServiceProvider()
ModelBinding\ModelBindingHelperTest.cs (1)
1502RequestServices = services.BuildServiceProvider()
ModelBinding\ParameterBinderTest.cs (1)
713RequestServices = services.BuildServiceProvider()
ObjectResultTests.cs (4)
51RequestServices = CreateServices(), 83RequestServices = CreateServices(), 112RequestServices = CreateServices(), 143RequestServices = CreateServices(),
RedirectToActionResultTest.cs (2)
92RequestServices = CreateServices().BuildServiceProvider(), 120RequestServices = CreateServices().BuildServiceProvider(),
RedirectToPageResultTest.cs (3)
25RequestServices = CreateServices(), 81RequestServices = CreateServices(), 138RequestServices = CreateServices(),
RedirectToRouteResultTest.cs (1)
170httpContext.RequestServices = services.BuildServiceProvider();
RequireHttpsAttributeTests.cs (5)
70requestContext.RequestServices = CreateServices(); 113requestContext.RequestServices = CreateServices(); 133requestContext.RequestServices = CreateServices(); 172requestContext.RequestServices = CreateServices(sslPort); 200requestContext.RequestServices = CreateServices(null, requireHttpsPermanent);
Routing\AttributeRouteTest.cs (1)
82httpContext.RequestServices = requestServices.Object;
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (8)
118RequestServices = Services, 147RequestServices = Services, 182RequestServices = Services, 229RequestServices = new ServiceCollection().AddScoped(sp => new CustomTransformer { State = "Invalid" }).BuildServiceProvider(), 260RequestServices = Services, 322RequestServices = Services, 361RequestServices = Services, 423RequestServices = Services,
Routing\UrlHelperBaseTest.cs (1)
124context.RequestServices = services;
Routing\UrlHelperTestBase.cs (1)
1151context.RequestServices = services;
src\Shared\ResultsTests\FileContentResultTestBase.cs (1)
366httpContext.RequestServices = services.BuildServiceProvider();
src\Shared\ResultsTests\FileStreamResultTestBase.cs (1)
454httpContext.RequestServices = services.BuildServiceProvider();
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
471httpContext.RequestServices = services.BuildServiceProvider();
src\Shared\ResultsTests\RedirectResultTestBase.cs (1)
73httpContext.RequestServices = GetServiceProvider();
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
503httpContext.RequestServices = services.BuildServiceProvider();
Microsoft.AspNetCore.Mvc.Cors.Test (1)
CorsAuthorizationFilterTest.cs (1)
146httpContext.RequestServices = services.BuildServiceProvider();
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerOutputFormatterTest.cs (1)
807httpContext.RequestServices = new ServiceCollection()
XmlSerializerOutputFormatterTest.cs (1)
589httpContext.RequestServices = new ServiceCollection()
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
AuthorizeFilterIntegrationTest.cs (1)
159RequestServices = GetServices()
ModelBindingTestHelper.cs (1)
158httpContext.RequestServices = GetServices(metadataProvider, updateOptions, mvcOptions);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
JsonResultTest.cs (1)
53httpContext.RequestServices = services.BuildServiceProvider();
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (1)
486httpContext.RequestServices = services.BuildServiceProvider();
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
PageLoaderMatcherPolicyTest.cs (1)
49RequestServices = new ServiceCollection().AddSingleton(loader.Object).BuildServiceProvider(),
Microsoft.AspNetCore.Mvc.Razor.Test (8)
DefaultTagHelperFactoryTest.cs (1)
141httpContext.RequestServices = services;
Infrastructure\DefaultTagHelperActivatorTest.cs (1)
25RequestServices = new ServiceCollection().BuildServiceProvider()
RazorPageActivatorTest.cs (1)
257RequestServices = serviceProvider
RazorPageCreateModelExpressionTest.cs (1)
320RequestServices = serviceCollection.BuildServiceProvider(),
RazorPageTest.cs (1)
1418httpContext.RequestServices = serviceProvider;
RazorViewTest.cs (1)
1792httpContext.RequestServices = serviceProvider;
TagHelpers\TagHelperComponentPropertyActivatorTest.cs (1)
52RequestServices = new ServiceCollection()
TagHelpers\TagHelperComponentTagHelperTest.cs (1)
390RequestServices = new ServiceCollection()
Microsoft.AspNetCore.Mvc.RazorPages.Test (19)
Infrastructure\DefaultPageFactoryProviderTest.cs (3)
262RequestServices = serviceProvider, 305RequestServices = serviceProvider, 343RequestServices = serviceProvider,
Infrastructure\DefaultPageModelActivatorProviderTest.cs (2)
44RequestServices = serviceCollection.BuildServiceProvider(), 74RequestServices = serviceCollection.BuildServiceProvider(),
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (8)
135RequestServices = Services, 164RequestServices = Services, 198RequestServices = Services, 239RequestServices = Services, 290RequestServices = new ServiceCollection().AddScoped(sp => new CustomTransformer() { State = "Invalid" }).BuildServiceProvider() 325RequestServices = Services, 366RequestServices = Services, 423RequestServices = Services,
Infrastructure\PageActionInvokerTest.cs (1)
1502httpContext.RequestServices = services.BuildServiceProvider();
Infrastructure\PageBinderFactoryTest.cs (1)
790RequestServices = services.BuildServiceProvider()
Infrastructure\ServiceBasedPageModelActivatorProviderTest.cs (3)
42RequestServices = serviceProvider.Object, 74RequestServices = serviceProvider.Object, 100RequestServices = Mock.Of<IServiceProvider>()
PageModelTest.cs (1)
1789httpContext.RequestServices = new ServiceCollection()
Microsoft.AspNetCore.Mvc.TagHelpers.Test (3)
ComponentTagHelperTest.cs (1)
85RequestServices = new ServiceCollection()
DefaultTagHelperActivatorTest.cs (1)
70RequestServices = services,
PersistComponentStateTagHelperTest.cs (1)
259RequestServices = new ServiceCollection()
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (15)
PageRemoteAttributeTest.cs (1)
204RequestServices = serviceProvider,
PartialViewResultTest.cs (2)
45var actionContext = new ActionContext(new DefaultHttpContext() { RequestServices = Mock.Of<IServiceProvider>(), }, new RouteData(), new ActionDescriptor()); 248httpContext.RequestServices = services.BuildServiceProvider();
RemoteAttributeBaseTest.cs (1)
479RequestServices = serviceProvider,
RemoteAttributeTest.cs (1)
470RequestServices = serviceProvider,
Rendering\DefaultTemplatesUtilities.cs (1)
277httpContext.RequestServices = serviceProvider;
ViewComponentResultTest.cs (4)
54var actionContext = new ActionContext(new DefaultHttpContext() { RequestServices = Mock.Of<IServiceProvider>(), }, new RouteData(), new ActionDescriptor()); 416httpContext.RequestServices = services.BuildServiceProvider(); 458httpContext.RequestServices = services.BuildServiceProvider(); 692httpContext.RequestServices = services.BuildServiceProvider();
ViewComponents\DefaultViewComponentActivatorTests.cs (1)
93RequestServices = Mock.Of<IServiceProvider>()
ViewComponents\ViewViewComponentResultTest.cs (1)
519httpContext.RequestServices = serviceProvider.Object;
ViewExecutorTest.cs (1)
196context.RequestServices = GetServiceProvider();
ViewResultTest.cs (2)
55var actionContext = new ActionContext(new DefaultHttpContext() { RequestServices = Mock.Of<IServiceProvider>(), }, new RouteData(), new ActionDescriptor()); 260httpContext.RequestServices = services.BuildServiceProvider();
Microsoft.AspNetCore.OpenApi.Tests (5)
Extensions\OpenApiEndpointRouteBuilderExtensionsTests.cs (5)
60context.RequestServices = serviceProvider; 91context.RequestServices = serviceProvider; 122context.RequestServices = serviceProvider; 147context.RequestServices = serviceProvider; 175context.RequestServices = serviceProvider;
Microsoft.AspNetCore.Routing.Tests (30)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (1)
98var httpContext = new DefaultHttpContext { RequestServices = services };
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (5)
638httpContext.RequestServices = new ServiceCollection().AddLogging().BuildServiceProvider(); 821httpContext.RequestServices = new ServiceCollection().AddLogging().BuildServiceProvider(); 848httpContext.RequestServices = new ServiceCollection().AddLogging().BuildServiceProvider(); 896httpContext.RequestServices = new ServiceCollection().BuildServiceProvider(); 974httpContext.RequestServices = serviceCollection.BuildServiceProvider();
EndpointMiddlewareTest.cs (13)
23httpContext.RequestServices = new ServiceProvider(); 46httpContext.RequestServices = new ServiceProvider(); 70httpContext.RequestServices = new ServiceProvider(); 105RequestServices = new ServiceProvider() 134RequestServices = new ServiceProvider() 159RequestServices = new ServiceProvider() 193RequestServices = new ServiceProvider() 231RequestServices = new ServiceProvider() 256RequestServices = new ServiceProvider() 290RequestServices = new ServiceProvider() 329RequestServices = new ServiceProvider() 354RequestServices = new ServiceProvider() 388RequestServices = new ServiceProvider()
EndpointRoutingMiddlewareFormOptionsTest.cs (1)
193RequestServices = new TestServiceProvider(),
EndpointRoutingMiddlewareTest.cs (1)
458RequestServices = new TestServiceProvider()
Matching\MatcherConformanceTest.cs (1)
19httpContext.RequestServices = CreateServices();
RequestDelegateRouteBuilderExtensionsTest.cs (1)
135httpContext.RequestServices = services;
RouteCollectionTest.cs (1)
631RequestServices = services.BuildServiceProvider(),
RouterMiddlewareTest.cs (3)
24RequestServices = services.BuildServiceProvider() 77httpContext.RequestServices = new ServiceProvider(); 108httpContext.RequestServices = new ServiceProvider();
RouteTest.cs (2)
661RequestServices = services.BuildServiceProvider(), 1522RequestServices = services.BuildServiceProvider(),
RoutingMetricsTests.cs (1)
180RequestServices = new TestServiceProvider()
9 references to RequestServices
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentResultTest.cs (1)
417var renderer = httpContext.RequestServices.GetRequiredService<EndpointHtmlRenderer>();
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateFactoryTests.cs (1)
1412Assert.Throws<NotSupportedException>(() => RequestDelegateFactory.Create(TestAction, new() { ServiceProvider = httpContext.RequestServices }));
Microsoft.AspNetCore.Http.Tests (7)
DefaultHttpContextTests.cs (7)
200Assert.Same(serviceProvider, context.RequestServices); 218Assert.NotNull(context.RequestServices); 221instance = context.RequestServices.GetRequiredService<DisposableThing>(); 226Assert.Null(context.RequestServices); 245Assert.NotNull(context.RequestServices); 248instance = context.RequestServices.GetRequiredService<DisposableThing>(); 253Assert.Null(context.RequestServices);