1 write to Key
Microsoft.Extensions.DependencyInjection.Abstractions (1)
FromKeyedServicesAttribute.cs (1)
18public FromKeyedServicesAttribute(object key) => Key = key;
10 references to Key
Microsoft.AspNetCore.Http.Abstractions (1)
Extensions\UseMiddlewareExtensions.cs (1)
241key = parameterInfo.GetCustomAttribute<FromKeyedServicesAttribute>(false)?.Key;
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
813var key = keyedServicesAttribute.Key;
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\BindingInfo.cs (1)
189bindingInfo.ServiceKey = fromKeyedServicesAttribute.Key;
Microsoft.AspNetCore.SignalR.Core (2)
Internal\HubMethodDescriptor.cs (2)
98if (keyedServiceProvider.IsKeyedService(GetServiceType(p.ParameterType), keyedServicesAttribute.Key)) 101KeyedServiceKeys.Add((index, keyedServicesAttribute.Key));
Microsoft.Extensions.AI.Tests (1)
Functions\AIFunctionFactoryTest.cs (1)
840(a.Services as IKeyedServiceProvider)?.GetKeyedService(p.ParameterType, attr.Key) is { } s ? s :
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\CallSiteFactory.cs (1)
703var parameterSvcId = new ServiceIdentifier(keyed.Key, parameterType);
Microsoft.Extensions.DependencyInjection.Abstractions (3)
ActivatorUtilities.cs (3)
418Expression.Constant(keyAttribute?.Key, typeof(object)) }; 530attr?.Key); 745_parameterKeys[i] = attr.Key;