コード例 #1
0
 public static IServiceDefintions AddTransient <TService>(this IServiceDefintions services, Func <INamedServiceProvider, TService> implementationFactory, string name = null)
     where TService : class
 {
     return(services.AddTransient(typeof(TService), typeof(TService), implementationFactory, name));
 }
コード例 #2
0
 public static IServiceDefintions AddTransient(this IServiceDefintions services, Type serviceType, Func <INamedServiceProvider, object> serviceFactory, string name = null)
 {
     return(services.AddTransient(serviceType, serviceType, serviceFactory, name));
 }
コード例 #3
0
 public static IServiceDefintions AddTransient <TService>(this IServiceDefintions services, string name = null)
     where TService : class
 {
     return(services.AddTransient(typeof(TService), typeof(TService), null, name));
 }
コード例 #4
0
 public static IServiceDefintions AddTransient(this IServiceDefintions services, Type serviceType, string name = null)
 {
     return(services.AddTransient(serviceType, serviceType, null, name));
 }