Beispiel #1
0
 private static void SetWebHostDefaults(IWebHostBuilder WebHostBuilder)
 {
     WebHostBuilder.UseElectron(Arguments)
     .UseStartup <Startup>()
     .UseConfiguration(JsonConfigurationProvider.BuildConfigurations())
     .UseSerilog(ConfigureLogger, writeToProviders: true);
 }
 public static IConfiguration BuildConfigurations(this IConfigurationBuilder Builder)
 {
     return(JsonConfigurationProvider.BuildConfigurations());
 }
Beispiel #3
0
        public static IServiceCollection AddJsonConfigurations(this IServiceCollection Services)
        {
            Services.AddSingleton(JsonConfigurationProvider.BuildConfigurations());

            return(Services);
        }
Beispiel #4
0
 private static void ConfigureLogger(WebHostBuilderContext WebHostBuilderContext, LoggerConfiguration LoggerConfiguration)
 {
     LoggerConfiguration.ReadFrom.Configuration(JsonConfigurationProvider.BuildConfigurations());
 }