mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 15:37:55 +02:00
Added IHandleAsync, these handlers will be run async and in parallel to each other.
This commit is contained in:
@@ -9,14 +9,32 @@ namespace NzbDrone.Common.Eventing
|
||||
public interface IHandle<TEvent> : IHandle where TEvent : IEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Handles the message.
|
||||
/// Handles the message synchronously.
|
||||
/// </summary>
|
||||
/// <param name = "message">The message.</param>
|
||||
void Handle(TEvent message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Denotes a class which can handle a particular type of message.
|
||||
/// </summary>
|
||||
/// <typeparam name = "TEvent">The type of message to handle.</typeparam>
|
||||
public interface IHandleAsync<TEvent> : IHandleAsync where TEvent : IEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Handles the message asynchronously.
|
||||
/// </summary>
|
||||
/// <param name = "message">The message.</param>
|
||||
void HandleAsync(TEvent message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A marker interface for classes that subscribe to messages.
|
||||
/// </summary>
|
||||
public interface IHandle { }
|
||||
|
||||
/// <summary>
|
||||
/// A marker interface for classes that subscribe to messages.
|
||||
/// </summary>
|
||||
public interface IHandleAsync : IHandle { }
|
||||
}
|
Reference in New Issue
Block a user