Exemple #1
0
 public static IServiceContainer AddTransient <TService>([NotNull] this IServiceContainer serviceContainer)
 {
     serviceContainer.Add(ServiceDefinition.Transient <TService>());
     return(serviceContainer);
 }
Exemple #2
0
 public static IServiceContainer AddTransient <TService, TServiceImplement>([NotNull] this IServiceContainer serviceContainer) where TServiceImplement : TService
 {
     serviceContainer.Add(ServiceDefinition.Transient <TService, TServiceImplement>());
     return(serviceContainer);
 }
Exemple #3
0
 public static IServiceContainer AddTransient <TService>([NotNull] this IServiceContainer serviceContainer, [NotNull] Func <IServiceProvider, object> func)
 {
     serviceContainer.Add(ServiceDefinition.Transient <TService>(func));
     return(serviceContainer);
 }