Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Program.cs 487B

123456789101112131415161718192021
  1. using Diligent.WebAPI.Host.Hubs;
  2. using Serilog;
  3. using Serilog.Formatting.Json;
  4. var builder = WebApplication.CreateBuilder(args);
  5. builder.ConfigureData(builder.Configuration);
  6. var collection = builder.Services;
  7. Diligent.WebAPI.Host.Extensions.ApiConfiguration.ConfigureServices(collection);
  8. var app = builder.Build();
  9. app.UseCors("ClientPermission");
  10. app.MapControllers();
  11. app.UseAuthentication();
  12. app.UseAuthorization();
  13. app.SetupData();
  14. app.MapHub<ChatHub>("/chatHub");
  15. app.Run();