keyedTransient<TService> static method

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

Creates an instance of ServiceDescriptor with the specified TService, and the ServiceLifetime.transient lifetime.

Implementation

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