mirror of https://github.com/abpframework/abp.git
9 changed files with 29 additions and 31 deletions
@ -1,17 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.EventBus |
|||
{ |
|||
/// <summary>
|
|||
/// Defines an interface of a class that handles events asynchrounously of type <see cref="IAsyncEventHandler{TEventData}"/>.
|
|||
/// </summary>
|
|||
/// <typeparam name="TEvent">Event type to handle</typeparam>
|
|||
public interface IAsyncEventHandler<in TEvent> : IEventHandler |
|||
{ |
|||
/// <summary>
|
|||
/// Handler handles the event by implementing this method.
|
|||
/// </summary>
|
|||
/// <param name="eventData">Event data</param>
|
|||
Task HandleEventAsync(TEvent eventData); |
|||
} |
|||
} |
|||
@ -1,11 +1,26 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.EventBus |
|||
{ |
|||
/// <summary>
|
|||
/// Undirect base interface for all event handlers.
|
|||
/// Implement <see cref="IAsyncEventHandler{TEventData}"/> instead of this one.
|
|||
/// Implement <see cref="IEventHandler{TEvent}"/> instead of this one.
|
|||
/// </summary>
|
|||
public interface IEventHandler |
|||
{ |
|||
|
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Defines an interface of a class that handles events asynchrounously of type <see cref="IEventHandler{TEvent}"/>.
|
|||
/// </summary>
|
|||
/// <typeparam name="TEvent">Event type to handle</typeparam>
|
|||
public interface IEventHandler<in TEvent> : IEventHandler |
|||
{ |
|||
/// <summary>
|
|||
/// Handler handles the event by implementing this method.
|
|||
/// </summary>
|
|||
/// <param name="eventData">Event data</param>
|
|||
Task HandleEventAsync(TEvent eventData); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue