2013-02-19 05:37:16 +03:00
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
namespace NzbDrone.Common.Eventing
|
|
|
|
{
|
|
|
|
/// <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>
|
|
|
|
public interface IHandle<TEvent> : IHandle where TEvent : IEvent
|
2013-02-19 05:37:16 +03:00
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Handles the message.
|
|
|
|
/// </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
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// A marker interface for classes that subscribe to messages.
|
|
|
|
/// </summary>
|
|
|
|
public interface IHandle { }
|
|
|
|
}
|