Program.cs 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. using AspectCore.Extensions.DependencyInjection;
  2. using Microsoft.AspNetCore.Hosting;
  3. using Microsoft.Extensions.Configuration;
  4. using Microsoft.Extensions.Hosting;
  5. using Microsoft.Extensions.Logging;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Threading.Tasks;
  10. using Agile.Config.Client;
  11. namespace OrderAdderCheck
  12. {
  13. public class Program
  14. {
  15. public static void Main(string[] args)
  16. {
  17. CreateHostBuilder(args).Build().Run();
  18. }
  19. public static IHostBuilder CreateHostBuilder(string[] args) =>
  20. Host.CreateDefaultBuilder(args)
  21. .ConfigureWebHostDefaults(webBuilder =>
  22. {
  23. webBuilder.UseStartup<Startup>();
  24. }).ConfigureAppConfiguration((context, config) =>
  25. {
  26. //ʹÓÃAddAgileConfigÅäÖÃÒ»¸öеÄIConfigurationSource
  27. config.AddAgileConfig();
  28. }).UseServiceProviderFactory(x => new DynamicProxyServiceProviderFactory());
  29. }
  30. }