Program.cs 795 B

1234567891011121314151617181920212223242526272829303132333435
  1. using AdService.Service;
  2. var builder = WebApplication.CreateBuilder(args);
  3. // Add services to the container.
  4. builder.Services.AddControllers();
  5. // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
  6. builder.Services.AddEndpointsApiExplorer();
  7. builder.Services.AddSwaggerGen();
  8. builder.Services.AddHostedService<AdReportService>();
  9. var app = builder.Build();
  10. // Configure the HTTP request pipeline.
  11. if (app.Environment.IsDevelopment())
  12. {
  13. app.UseSwagger();
  14. app.UseSwaggerUI();
  15. }
  16. app.UseHttpsRedirection();
  17. app.UseAuthorization();
  18. app.MapControllers();
  19. app.Run();
  20. /*WebApiHelper.Start(_localPort: 7011,
  21. dtoXmlName: "02.DW5S.DTO.xml",
  22. controllerXmlName: "AdService.Controller.xml",
  23. dllKey: "DW5S");*/