in generators/app/templates/default/src/Foundation/DependencyInjection/CodeFolderX/ServiceCollectionExtensions.cs [81:94]
public static void Add(this IServiceCollection serviceCollection, Type type, Lifetime lifetime)
{
switch (lifetime)
{
case Lifetime.Singleton:
serviceCollection.AddSingleton(type);
break;
case Lifetime.Transient:
serviceCollection.AddTransient(type);
break;
default:
throw new ArgumentOutOfRangeException(nameof(lifetime), lifetime, null);
}
}