1 write to Key
Microsoft.Extensions.DependencyInjection.Abstractions (1)
FromKeyedServicesAttribute.cs (1)
18public FromKeyedServicesAttribute(object key) => Key = key;
11 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 (2)
Functions\AIFunctionFactory.cs (2)
919if ((arguments.Services as IKeyedServiceProvider)?.GetKeyedService(parameterType, keyedAttr.Key) is { } service) 931Throw.ArgumentException(nameof(arguments), $"No service of type '{parameterType}' with key '{keyedAttr.Key}' was found for parameter '{parameter.Name}'.");
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\CallSiteFactory.cs (1)
634var 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;