diff options
| author | crobibero <cody@robibe.ro> | 2020-08-31 08:00:05 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-08-31 08:00:05 -0600 |
| commit | bd66fd25df772f3fd352fdda58e71474e255400a (patch) | |
| tree | a6102da6a9f120d7c887f460c5d603be92ea199f /MediaBrowser.Controller/Events/IEventManager.cs | |
| parent | 9626101c9f8d0acceb2ecf97bed502c272d6e4f6 (diff) | |
| parent | 0424d09b8daf3626fd7de65b601e707afdb00599 (diff) | |
Merge remote-tracking branch 'upstream/master' into 3.1.7
Diffstat (limited to 'MediaBrowser.Controller/Events/IEventManager.cs')
| -rw-r--r-- | MediaBrowser.Controller/Events/IEventManager.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Events/IEventManager.cs b/MediaBrowser.Controller/Events/IEventManager.cs new file mode 100644 index 000000000..a1f40b3a6 --- /dev/null +++ b/MediaBrowser.Controller/Events/IEventManager.cs @@ -0,0 +1,28 @@ +using System; +using System.Threading.Tasks; + +namespace MediaBrowser.Controller.Events +{ + /// <summary> + /// An interface that handles eventing. + /// </summary> + public interface IEventManager + { + /// <summary> + /// Publishes an event. + /// </summary> + /// <param name="eventArgs">the event arguments.</param> + /// <typeparam name="T">The type of event.</typeparam> + void Publish<T>(T eventArgs) + where T : EventArgs; + + /// <summary> + /// Publishes an event asynchronously. + /// </summary> + /// <param name="eventArgs">The event arguments.</param> + /// <typeparam name="T">The type of event.</typeparam> + /// <returns>A task representing the publishing of the event.</returns> + Task PublishAsync<T>(T eventArgs) + where T : EventArgs; + } +} |
