tryAddScoped<TService> method
Adds the specified TService
as a ServiceLifetime.scoped service
using the factory specified in implementationFactory
to the services
if the service type hasn't already been registered.
Implementation
void tryAddScoped<TService>(
ImplementationFactory implementationFactory,
) {
final descriptor = ServiceDescriptor.scoped<TService>(
implementationFactory,
);
tryAdd(descriptor);
}