Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dotnet/src/SemanticKernel.Abstractions/Kernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public IEnumerable<T> GetAllServices<T>() where T : class
// M.E.DI doesn't support querying for a service without a key, and it also doesn't
// support AnyKey currently: https://github.com/dotnet/runtime/issues/91466
// As a workaround, KernelBuilder injects a service containing the type-to-all-keys
// mapping. We can query for that service and and then use it to try to get a service.
// mapping. We can query for that service and then use it to try to get a service.
if (this.Services.GetKeyedService<Dictionary<Type, HashSet<object?>>>(KernelServiceTypeToKeyMappings) is { } typeToKeyMappings)
{
if (typeToKeyMappings.TryGetValue(typeof(T), out HashSet<object?>? keys))
Expand Down