keyedSingleton<TService> static method
ServiceDescriptor
keyedSingleton<TService>(
- Object? serviceKey,
- ImplementationFactory implementationFactory
Creates an instance of ServiceDescriptor with the specified
TService, serviceKey, implementationFactory
and the ServiceLifetime.singleton lifetime.
Implementation
static ServiceDescriptor keyedSingleton<TService>(
Object? serviceKey,
ImplementationFactory implementationFactory,
) =>
ServiceDescriptor._factory(
serviceType: TService,
serviceKey: serviceKey,
factory: implementationFactory,
lifetime: ServiceLifetime.singleton,
);