Program.cs 873 B

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