33 references to FromKeyedServices
BasicWebSite (7)
Controllers\CustomServiceApiController.cs (7)
13public ActionResult<string> GetOk([FromKeyedServices("ok_service")] ICustomService service) 19public ActionResult<string> GetNotOk([FromKeyedServices("not_ok_service")] ICustomService service) 26[FromKeyedServices("ok_service")] ICustomService s1, 27[FromKeyedServices("not_ok_service")] ICustomService s2) 33public ActionResult<string> GetKeyNull([FromKeyedServices(null)] ICustomService service) 41public ActionResult<string> GetOptionalNotRegistered([FromKeyedServices("no_existing_key")] ICustomService? service) 51public ActionResult<string> GetRequiredNotRegistered([FromKeyedServices("no_existing_key")] ICustomService service)
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
UseMiddlewareTest.cs (2)
415public Task Invoke(HttpContext context, [FromKeyedServices("test")] IKeyedServiceProvider provider) => Task.CompletedTask; 420public MiddlewareKeyedConstructorInjectInvoke(RequestDelegate next, [FromKeyedServices("test")] IKeyedServiceProvider provider) { }
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
ModelBinding\BindingInfoTest.cs (2)
298new FromKeyedServicesAttribute(key), 319new FromKeyedServicesAttribute(new object()),
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
DefaultApiDescriptionProviderTest.cs (1)
2478private void AcceptsFormatters_Services([FromServices] ITestService tempDataProvider, [FromKeyedServices("foo")] ITestService keyedTempDataProvider)
EndpointMetadataApiDescriptionProviderTest.cs (1)
583Assert.Empty(GetApiDescription(([FromKeyedServices("foo")] InferredServiceClass foo) => { }).ParameterDescriptions);
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiGeneratorTests.cs (1)
417Assert.Empty(GetOpenApiOperation(([FromKeyedServices("foo")] int foo) => { }).Parameters);
Microsoft.AspNetCore.SignalR.Tests (8)
HubConnectionHandlerTestUtils\Hubs.cs (8)
1411public int MultipleSameKeyedServices([FromKeyedServices("service1")] Service1 service, [FromKeyedServices("service1")] Service1 service2) 1417public int KeyedService([FromKeyedServices("service1")] Service1 service) 1422public int KeyedServiceWithParam(int input, [FromKeyedServices("service1")] Service1 service) 1427public int KeyedServiceNonKeyedService(Service2 service2, [FromKeyedServices("service1")] Service1 service) 1432public int MultipleKeyedServices([FromKeyedServices("service1")] Service1 service, [FromKeyedServices("service2")] Service1 service2) 1441public void BadMethod([FromKeyedServices("service1")] [FromService] Service1 service)
ProxylessEndToEnd.ApiService (1)
Program.cs (1)
20app.MapGet("/redis", ([FromKeyedServices("redis")] IConnectionMultiplexer redis) =>
Redis.ApiService (6)
Program.cs (6)
31app.MapGet("/garnet/ping", async ([FromKeyedServices("garnet")] IConnectionMultiplexer connection) => 36app.MapGet("/garnet/set", async ([FromKeyedServices("garnet")] IConnectionMultiplexer connection) => 41app.MapGet("/garnet/get", async ([FromKeyedServices("garnet")] IConnectionMultiplexer connection) => 47app.MapGet("/valkey/ping", async ([FromKeyedServices("valkey")] IConnectionMultiplexer connection) => 52app.MapGet("/valkey/set", async ([FromKeyedServices("valkey")] IConnectionMultiplexer connection) => 57app.MapGet("/valkey/get", async ([FromKeyedServices("valkey")] IConnectionMultiplexer connection) =>
TestProject.IntegrationServiceA (1)
Redis\RedisExtensions.cs (1)
13private static async Task<IResult> VerifyRedisAsync([FromKeyedServices("redis")] IConnectionMultiplexer cm)
WebPubSubWeb (3)
Program.cs (3)
34app.MapGet("/negotiate/chat", ([FromKeyedServices(Constants.ChatHubName)] WebPubSubServiceClient service) => 43app.MapGet("/negotiate/notification", ([FromKeyedServices(Constants.NotificationHubName)] WebPubSubServiceClient service) => 53app.Map($"/eventhandler/{Constants.ChatHubName}", async ([FromKeyedServices(Constants.ChatHubName)] WebPubSubServiceClient service, HttpContext context, ILogger logger) => {