Program.cs 573 B

123456789101112131415161718192021
  1. using Microsoft.Extensions.DependencyInjection;
  2. using Microsoft.Extensions.Hosting;
  3. using System;
  4. namespace PlatformBenchmarks
  5. {
  6. class Program
  7. {
  8. public static bool Debug = false;
  9. public static void Main(string[] args)
  10. {
  11. Debug = (args != null && args.Length > 0 && args[0] == "debug");
  12. new HostBuilder().ConfigureServices(delegate (HostBuilderContext hostContext, IServiceCollection services)
  13. {
  14. services.AddHostedService<HttpServer>();
  15. }).Build().Run();
  16. }
  17. }
  18. }