addSingletonFactory<TService extends Object> method

void addSingletonFactory<TService extends Object>(
  1. ServiceFactory<TService> factory
)

Registers a singleton service of the specified TService type implemented by the specified factory.

Implementation

void addSingletonFactory<TService extends Object>(
  ServiceFactory<TService> factory,
) {
  addFactory(ServiceLifetime.singleton, factory);
}