Allow subscription keys to be resolved by reflection

This commit is contained in:
TheXamlGuy
2024-06-02 18:48:51 +01:00
parent 48b33416c9
commit 1a0d750f02
4 changed files with 26 additions and 13 deletions
+8 -1
View File
@@ -120,7 +120,14 @@ public class Subscription(SubscriptionCollection subscriptions,
keys[attribute.Type] = value;
}
value.Add(attribute.Key);
if (subscriber.GetPropertyValue(() => attribute.Key) is object key)
{
value.Add(key);
}
else
{
value.Add(attribute.Key);
}
}
return keys;