addTransient<TService> method

ServiceCollection addTransient<TService>(
  1. ImplementationFactory implementationFactory
)

Adds a transient service of the type specified in TService with a factory specified in implementationFactory to the specified ServiceCollection.

Implementation

ServiceCollection addTransient<TService>(
  ImplementationFactory implementationFactory,
) {
  final descriptor = ServiceDescriptor.transient<TService>(
    implementationFactory,
  );
  add(descriptor);
  return this;
}