Program.cs 543 B

1234567891011121314151617181920
  1. using Microsoft.Extensions.DependencyInjection;
  2. using Microsoft.Extensions.Hosting;
  3. namespace ActionBlockTest
  4. {
  5. public class Program
  6. {
  7. public static void Main(string[] args)
  8. {
  9. CreateHostBuilder(args).Build().Run();
  10. }
  11. public static IHostBuilder CreateHostBuilder(string[] args) =>
  12. Host.CreateDefaultBuilder(args)
  13. .ConfigureServices((hostContext, services) =>
  14. {
  15. services.AddHostedService<Worker>();
  16. });
  17. }
  18. }