mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-20 04:18:51 -07:00
21 lines
659 B
C#
21 lines
659 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MediaBrowser.Controller.Events
|
|
{
|
|
/// <summary>
|
|
/// An interface representing a type that consumes events of type <c>T</c>.
|
|
/// </summary>
|
|
/// <typeparam name="T">The type of events this consumes.</typeparam>
|
|
public interface IEventConsumer<in T>
|
|
where T : EventArgs
|
|
{
|
|
/// <summary>
|
|
/// A method that is called when an event of type <c>T</c> is fired.
|
|
/// </summary>
|
|
/// <param name="eventArgs">The event.</param>
|
|
/// <returns>A task representing the consumption of the event.</returns>
|
|
Task OnEvent(T eventArgs);
|
|
}
|
|
}
|