Fix more edge cases

This commit is contained in:
TheXamlGuy
2024-05-31 22:50:52 +01:00
parent 8f1a3252c6
commit c24538f545
16 changed files with 212 additions and 118 deletions
+1
View File
@@ -6,6 +6,7 @@ public class HandlerProvider(SubscriptionCollection subscriptions) :
public IEnumerable<object?> Get(Type type,
object? key = null)
{
var d = subscriptions;
string subscriptionKey = $"{(key is not null ? $"{key}:" : "")}{type}";
if (subscriptions.TryGetValue(subscriptionKey, out List<WeakReference>? subscribers))
{