/// <summary> /// /// </summary> /// <param name="services"></param> /// <param name="info"></param> private static void RegisterSingletonService(IServiceCollection services, AutoDependencyInjectionInfo info) { info.BaseTypes.ForEach(baseType => services.AddSingleton(baseType, info.ServiceType)); }
/// <summary> /// /// </summary> /// <param name="services"></param> /// <param name="info"></param> private static void RegisterTransientService(IServiceCollection services, AutoDependencyInjectionInfo info) { info.BaseTypes.ForEach(baseType => services.AddTransient(baseType, info.ServiceType)); }