You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GetRoomsWhichSupportCreatedHandler.cs 737B

1234567891011121314151617181920
  1. using Diligent.WebAPI.Business.Services;
  2. using Diligent.WebAPI.Data.Entities;
  3. using Diligent.WebAPI.Host.Mediator.Rooms.Queries;
  4. using MediatR;
  5. namespace Diligent.WebAPI.Host.Mediator.Chat.Handlers
  6. {
  7. public class GetRoomsWhichSupportCreatedHandler : IRequestHandler<GetRoomsWhichSupportCreatedQuery, List<Room>>
  8. {
  9. private readonly RoomService _roomService;
  10. public GetRoomsWhichSupportCreatedHandler(RoomService roomService)
  11. {
  12. _roomService = roomService;
  13. }
  14. public async Task<List<Room>> Handle(GetRoomsWhichSupportCreatedQuery request, CancellationToken cancellationToken) =>
  15. await _roomService.GetRoomsWhichSupportCreated(request.SupportId);
  16. }
  17. }