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

17 lines
623 B
C#
Raw Normal View History

2013-09-11 06:33:47 +00:00
using NzbDrone.Common.Messaging;
using NzbDrone.Core.Messaging.Commands;
2013-09-11 06:33:47 +00:00
namespace NzbDrone.Core.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;
2013-09-11 06:33:47 +00:00
void PublishCommand<TCommand>(TCommand command) where TCommand : Command;
void PublishCommand(string commandTypeName);
2013-09-11 06:33:47 +00:00
Command PublishCommandAsync<TCommand>(TCommand command) where TCommand : Command;
Command PublishCommandAsync(string commandTypeName);
}
}