Allow the Mediator to be subscribed to and therefore handled

This commit is contained in:
TheXamlGuy
2024-05-15 19:28:08 +01:00
parent 7e57c0d28d
commit 8c0436644a
6 changed files with 67 additions and 24 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ public class HandlerProvider(SubscriptionCollection subscriptions) :
IHandlerProvider
{
public IEnumerable<object?> Get(Type type,
object key)
object? key = null)
{
string subscriptionKey = $"{(key is not null ? $"{key}:" : "")}{type}";
if (subscriptions.TryGetValue(subscriptionKey, out List<WeakReference>? subscribers))