Nessuna descrizione

DependencyInjectionHandler.cs 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Mediator;
  2. using MediatR;
  3. using Microsoft.AspNetCore.Builder;
  4. using Microsoft.Extensions.DependencyInjection;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Reflection;
  10. using System.Threading.Tasks;
  11. namespace Backend.API.Config
  12. {
  13. internal static class DependencyInjectionHandler
  14. {
  15. internal static IServiceCollection AddMediaRHandlerDependency(this IServiceCollection services)
  16. {
  17. services.AddMediatR(Assembly.GetExecutingAssembly());
  18. services.AddMediatR(typeof(GetTypeProprieteListHandler).Assembly);
  19. services.AddMediatR(typeof(AddTypeProprieteHandler).Assembly);
  20. services.AddMediatR(typeof(RemoveTypeProprieteHandler).Assembly);
  21. services.AddMediatR(typeof(GetProprieteListHandler).Assembly);
  22. services.AddMediatR(typeof(AddProprieteHandler).Assembly);
  23. services.AddMediatR(typeof(RemoveProprieteHandler).Assembly);
  24. services.AddMediatR(typeof(GetProduitListHandler).Assembly);
  25. services.AddMediatR(typeof(AddProduitHandler).Assembly);
  26. services.AddMediatR(typeof(RemoveProduitHandler).Assembly);
  27. services.AddMediatR(typeof(GetCommandeListHandler).Assembly);
  28. services.AddMediatR(typeof(AddCommandeHandler).Assembly);
  29. services.AddMediatR(typeof(RemoveCommandeHandler).Assembly);
  30. services.AddMediatR(typeof(GetLigneCommandeListHandler).Assembly);
  31. services.AddMediatR(typeof(AddLigneCommandeHandler).Assembly);
  32. services.AddMediatR(typeof(RemoveLigneCommandeHandler).Assembly);
  33. return services;
  34. }
  35. }
  36. }

Powered by TurnKey Linux.