factory<TService extends Object> static method

ServiceDescriptor factory<TService extends Object>(
  1. ServiceLifetime lifetime,
  2. ServiceFactory<TService> factory, [
  3. bool isGenerated = false
])

Creates a service descriptor for the specified TService type with specified lifetime and implementationFactory.

Implementation

static ServiceDescriptor factory<TService extends Object>(
  ServiceLifetime lifetime,
  ServiceFactory<TService> factory, [
  bool isGenerated = false,
]) {
  return ServiceDescriptor._(
    TService,
    lifetime,
    factory,
    null,
    null,
    isGenerated,
  );
}