implement Optional Eventing in InMemory Stores for Push and WebRTC Connections and also Groups ...

This commit is contained in:
2025-07-14 06:00:29 +03:30
parent 2518bf1077
commit 6e1fb930a5
11 changed files with 184 additions and 72 deletions
+6 -3
View File
@@ -261,7 +261,8 @@ namespace xPushService.DI
{
//
Log($"there is no provided PushGroupStore, try to register XPushGroupInMemoryStore ...");
groupStore = new XPushGroupInMemoryStore();
var storeEvents = services.GetRegisteredService<IXPushGroupStoreEvents>();
groupStore = new XPushGroupInMemoryStore(storeEvents);
services.AddSingleton<IXPushGroupStore>(groupStore);
}
@@ -271,7 +272,8 @@ namespace xPushService.DI
{
//
Log($"there is no provided XPushConnectionStore, try to register XPushConnectionInMemoryStore ...");
connectionStore = new XPushConnectionInMemoryStore();
var storeEvents = services.GetRegisteredService<IXPushConnectionStoreEvents>();
connectionStore = new XPushConnectionInMemoryStore(storeEvents);
services.AddSingleton<IXPushConnectionStore>(connectionStore);
}
@@ -281,7 +283,8 @@ namespace xPushService.DI
{
//
Log($"there is no provided XWebRTCConnectionStore, try to register XWebRTCConnectionInMemoryStore ...");
webRtcConnectionStore = new XWebRTCConnectionInMemoryStore();
var storeEvents = services.GetRegisteredService<IXWebRTCConnectionStoreEvents>();
webRtcConnectionStore = new XWebRTCConnectionInMemoryStore(storeEvents);
services.AddSingleton<IXWebRTCConnectionStore>(webRtcConnectionStore);
}
#endregion