public static IServiceContainer AddSingleton <TService>([NotNull] this IServiceContainer serviceContainer) { serviceContainer.Add(ServiceDefinition.Singleton <TService>()); return(serviceContainer); }
public static IServiceContainer AddSingleton <TService, TServiceImplement>([NotNull] this IServiceContainer serviceContainer) where TServiceImplement : TService { serviceContainer.Add(ServiceDefinition.Singleton <TService, TServiceImplement>()); return(serviceContainer); }
public static IServiceContainer AddSingleton <TService>([NotNull] this IServiceContainer serviceContainer, [NotNull] Func <IServiceProvider, object> func) { serviceContainer.Add(ServiceDefinition.Singleton <TService>(func)); return(serviceContainer); }