| 1234567891011121314151617181920 |
- namespace Application.Abstractions.Messaging;
- /// <summary>
- /// Command/Query를 적절한 Handler로 디스패치합니다. (MediatR ISender 대체)
- /// </summary>
- public interface ISender
- {
- /// <summary>반환값이 있는 Command/Query를 처리합니다.</summary>
- Task<TResponse> Send<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default);
- /// <summary>반환값이 없는 Command를 처리합니다.</summary>
- Task Send(IRequest request, CancellationToken cancellationToken = default);
- }
- /// <summary>
- /// 기존 MediatR IMediator 호출부 호환용입니다. ISender와 동일하게 동작합니다.
- /// </summary>
- public interface IMediator : ISender
- {
- }
|