Program.cs 907 B

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