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