keyedScoped<TService> static method

ServiceDescriptor keyedScoped<TService>(
  1. Object? serviceKey,
  2. ImplementationFactory implementationFactory
)

Creates an instance of ServiceDescriptor with the specified TService, implementationFactory and the ServiceLifetime.scoped.

Implementation

static ServiceDescriptor keyedScoped<TService>(
  Object? serviceKey,
  ImplementationFactory implementationFactory,
) =>
    ServiceDescriptor._factory(
      serviceType: TService,
      serviceKey: serviceKey,
      factory: implementationFactory,
      lifetime: ServiceLifetime.scoped,
    );