2013-04-24 04:56:00 +03:00
|
|
|
namespace NzbDrone.Common.Messaging
|
2013-02-19 05:37:16 +03:00
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Denotes a class which can handle a particular type of message.
|
|
|
|
/// </summary>
|
2013-02-24 22:18:48 +03:00
|
|
|
/// <typeparam name = "TEvent">The type of message to handle.</typeparam>
|
2013-04-24 04:56:00 +03:00
|
|
|
public interface IHandle<TEvent> : IProcessMessage where TEvent : IEvent
|
2013-02-19 05:37:16 +03:00
|
|
|
{
|
|
|
|
/// <summary>
|
2013-03-05 09:25:05 +03:00
|
|
|
/// Handles the message synchronously.
|
2013-02-19 05:37:16 +03:00
|
|
|
/// </summary>
|
|
|
|
/// <param name = "message">The message.</param>
|
2013-02-24 22:18:48 +03:00
|
|
|
void Handle(TEvent message);
|
2013-02-19 05:37:16 +03:00
|
|
|
}
|
|
|
|
|
2013-03-05 09:25:05 +03:00
|
|
|
/// <summary>
|
|
|
|
/// Denotes a class which can handle a particular type of message.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name = "TEvent">The type of message to handle.</typeparam>
|
2013-04-24 04:56:00 +03:00
|
|
|
public interface IHandleAsync<TEvent> : IProcessMessageAsync where TEvent : IEvent
|
2013-03-05 09:25:05 +03:00
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Handles the message asynchronously.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name = "message">The message.</param>
|
|
|
|
void HandleAsync(TEvent message);
|
|
|
|
}
|
2013-02-19 05:37:16 +03:00
|
|
|
}
|