aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Events/EventBus.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-09-02 18:41:51 -0500
committerJP Dillingham <jp@dillingham.me>2024-09-02 18:41:51 -0500
commit2805a4c368e9585162f6379bb862e0951790613e (patch)
tree82955c9ebac885f99f34b52b147be5ccc94a5d46 /src/slskd/Events/EventBus.cs
parent51836f520fe400a33ad9daab932f13c2ed24467d (diff)
downloadslskd-2805a4c368e9585162f6379bb862e0951790613e.tar.gz
rename types back :shrug:
Diffstat (limited to 'src/slskd/Events/EventBus.cs')
-rw-r--r--src/slskd/Events/EventBus.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/slskd/Events/EventBus.cs b/src/slskd/Events/EventBus.cs
index c3e418e7..e5552d2d 100644
--- a/src/slskd/Events/EventBus.cs
+++ b/src/slskd/Events/EventBus.cs
@@ -71,12 +71,12 @@ public class EventBus
/// <param name="data">The event data.</param>
/// <typeparam name="T">The Type of the event.</typeparam>
public virtual void Raise<T>(T data)
- where T : BaseEvent
+ where T : Event
{
Log.Debug("Handling {Type}: {Data}", typeof(T), data);
// save the event to the database before broadcasting to consumers
- Events.Add(Event.From<T>(data));
+ Events.Add(EventRecord.From<T>(data));
// broadcast the event in a fire-and-forget fashion
// we don't need to wait for anything, just need to kick off the tasks
@@ -148,6 +148,7 @@ public class EventBus
/// <typeparam name="T">The Type of the event.</typeparam>
/// <param name="subscriber">The unique name of the subscriber.</param>
public virtual void Unsubscribe<T>(string subscriber)
+ where T : Event
{
if (Subscriptions.TryGetValue(typeof(T), out var subscriptions))
{