sonarr-repo-only/NzbDrone.Common/Messaging/IMessageAggregator.cs

16 lines
627 B
C#
Raw Normal View History

using NzbDrone.Common.Messaging.Tracking;
namespace NzbDrone.Common.Messaging
{
/// <summary>
2013-02-23 20:09:44 +00:00
/// Enables loosely-coupled publication of events.
/// </summary>
public interface IMessageAggregator
{
2013-05-13 02:52:55 +00:00
void PublishEvent<TEvent>(TEvent @event) where TEvent : class, IEvent;
void PublishCommand<TCommand>(TCommand command) where TCommand : class, ICommand;
void PublishCommand(string commandTypeName);
TrackedCommand PublishCommandAsync<TCommand>(TCommand command) where TCommand : class, ICommand;
TrackedCommand PublishCommandAsync(string commandTypeName);
}
}