diff options
| author | crobibero <cody@robibe.ro> | 2020-09-01 18:24:42 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-09-01 18:24:42 -0600 |
| commit | f443c534bfac9feea4c92033e85a9aa5097ec4f5 (patch) | |
| tree | 6d0bcffc442c283f999232c54536c9d774a6f672 /MediaBrowser.Controller/Events/IEventManager.cs | |
| parent | 852213d90cd6fe3c4e7b6922ca1f8162bc34c55e (diff) | |
| parent | 506fc7cbaeb8f82716f84b125ac598ff740bf552 (diff) | |
Merge remote-tracking branch 'upstream/master' into package-install-repo
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; + } +} |
