private static void RegisterCoreComponents(AutofacAspNetServiceCollection serviceImpl)
 {
     serviceImpl.BuildConfiguration();
     serviceImpl.ActiveSinkSettings();
     serviceImpl.ActiveOriginConfiguration();
     serviceImpl.AddDependency(s => s.AddSingleton(provider => new StaticServiceResolveInitialization(provider.GetRequiredService <ILoggingServiceProvider>())));
 }
예제 #2
0
        private static void RegisterCoreComponents(AutofacAspNetServiceCollection services)
        {
            services.BuildConfiguration();
            services.ActiveSinkSettings();
            services.ActiveOriginConfiguration();
            services.AddDependency(s => s.AddSingleton(__singletonFactory));

            StaticServiceResolveInitialization __singletonFactory(IServiceProvider provider)
            {
                return(new StaticServiceResolveInitialization(provider.GetRequiredService <ILoggingServiceProvider>()));
            }
        }