addKeyedSingletonInstance<TService> method
Adds a keyed singleton service of the type specified in TService
with an instance specified in implementationInstance to the specified
ServiceCollection.
Implementation
ServiceCollection addKeyedSingletonInstance<TService>(
Object? serviceKey,
Object implementationInstance,
) {
final descriptor = ServiceDescriptor.keyedSingletonInstance<TService>(
serviceKey,
implementationInstance,
);
add(descriptor);
return this;
}