Пример #1
0
 public static IHostBuilder CreateHostBuilder(string[] args)
 {
     return(Host.CreateDefaultBuilder(args)
            .ConfigureWebHostDefaults(webBuilder =>
     {
         webBuilder.UseStartup <Startup>();
         webBuilder.UseConfiguration(AppConfigurations.GetWithEnvironment(Directory.GetCurrentDirectory(), args));
         webBuilder.UseEnvironment(AppConfigurations.GetEnvironment());
     })
            .ConfigureLogging(logging =>
     {
         logging.ClearProviders();
         logging.SetMinimumLevel(LogLevel.Trace);
     })
            .UseNLog()
            .UseEnvironment(AppConfigurations.GetEnvironment())
            );
 }