diff options
Diffstat (limited to 'MediaBrowser.Controller/Events/IEventConsumer.cs')
| -rw-r--r-- | MediaBrowser.Controller/Events/IEventConsumer.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Events/IEventConsumer.cs b/MediaBrowser.Controller/Events/IEventConsumer.cs new file mode 100644 index 000000000..5c4ab5d8d --- /dev/null +++ b/MediaBrowser.Controller/Events/IEventConsumer.cs @@ -0,0 +1,20 @@ +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); + } +} |
