addFactory<TService extends Object> method
void
addFactory<TService extends Object>(
- ServiceLifetime lifetime,
- ServiceFactory<
TService> factory, [ - bool isGenerated = false
Registers a service with specified lifetime
of the specified TService
type
implemented by the specified factory
.
Implementation
void addFactory<TService extends Object>(
ServiceLifetime lifetime,
ServiceFactory<TService> factory, [
bool isGenerated = false,
]) {
add(ServiceDescriptor.factory<TService>(lifetime, factory, isGenerated));
}