Allow the Mediator to be subscribed to and therefore handled
This commit is contained in:
@@ -3,7 +3,11 @@ namespace Toolkit.Foundation
|
||||
{
|
||||
public interface IMediator
|
||||
{
|
||||
Task<object?> Handle(object message, CancellationToken cancellationToken = default);
|
||||
Task<TResponse?> Handle<TRequest, TResponse>(TRequest request, CancellationToken cancellationToken = default) where TRequest : notnull;
|
||||
Task<object?> Handle(object message,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TResponse?> Handle<TMessage, TResponse>(TMessage message,
|
||||
CancellationToken cancellationToken = default)
|
||||
where TMessage : notnull;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user