MediatR v6.0.0 Release Notes
Release Date: 2018-12-10 // over 5 years ago-
๐ This release brings a slight breaking change to the
Mediator
class. It adds a non-generic method overload toPublish
:public interface IMediator { Task\<TResponse\> Send\<TResponse\>(IRequest\<TResponse\> request, CancellationToken cancellationToken = default);+ Task Publish(object notification, CancellationToken cancellationToken = default); Task Publish\<TNotification\>(TNotification notification, CancellationToken cancellationToken = default) where TNotification : INotification; }
And expands the publishing possibilities for the
Mediator
class:- protected virtual async Task PublishCore(IEnumerable\<Task\> allHandlers)+ protected virtual async Task PublishCore(IEnumerable\<Func\<Task\>\> allHandlers) { foreach (var handler in allHandlers) {- await handler.ConfigureAwait(false);+ await handler().ConfigureAwait(false); }
If you've overridden the
PublishCore
method, check out the publishing options section in the wiki for some examples.๐ This release targets
net461
andnetstandard2.0
and adds strong-naming to the assembly.net45
andnetstandard1.3
were dropped.