using MediatR; using FinkiChattery.Common.Mediator.Contracs; using FinkiChattery.Common.Mediator.Interfaces; using System.Threading; using System.Threading.Tasks; namespace FinkiChattery.Common.Mediator { public class MediatorService : IMediatorService { private readonly IMediator mediator; public MediatorService(IMediator mediator) { this.mediator = mediator; } public async Task SendAsync(ICommand request, CancellationToken cancellationToken) { return await mediator.Send(request, cancellationToken); } public async Task SendAsync(ICommand request) { return await mediator.Send(request); } } }