/// <summary> /// Initialize /// </summary> /// <param name="root"></param> /// <returns></returns> /// <exception cref="InvalidOperationException"></exception> public static ILogServiceCollection Initialize(IConfigurationRoot root) { if (_initialized) { throw new InvalidOperationException("You have initialized Cosmos.Logging."); } return(SoloDependencyContainer.Initialize(new ServiceCollection(), root)); }
public static ILogServiceCollection Initialize(IConfigurationRoot root) { if (_initialized) { throw new InvalidOperationException("You have initialized Cosmos.Logging."); } IServiceCollection services = new ServiceCollection(); services.TryAdd(ServiceDescriptor.Singleton <ILoggingServiceProvider, ConsoleLoggingServiceProvider>()); return(SoloDependencyContainer.Initialize(services, root)); }
public static void AllDone(this ILogServiceCollection services) { SoloDependencyContainer.AllDone(services); LOGGER._initialized = true; }
/// <summary> /// ALl done /// </summary> /// <param name="services"></param> public static void AllDone(this II18NServiceCollection services) { SoloDependencyContainer.AllDone(services); }
private static ILoggingServiceProvider TouchProvider() => SoloDependencyContainer.GetServiceResolver().GetService <ILoggingServiceProvider>();
/// <summary> /// Gets scoped service resolver /// </summary> /// <returns></returns> public static IServiceProvider GetScopedServiceResolver() => SoloDependencyContainer.GetScopedServiceResolver();
/// <summary> /// Initialize /// </summary> /// <returns></returns> public static I18NServiceCollection Initialize() { return(SoloDependencyContainer.Initialize(new I18NServiceCollection())); }