public bool IsSessionSynced(string sessionID) { if (sessionID == null) { return(false); } bool sessionSynced = false; lock (SyncedMap) sessionSynced = SyncedMap.ContainsKey(sessionID) ? SyncedMap[sessionID] : false; return(sessionSynced); }
public void UpdateSyncedStatus(string sessionId, bool val) { lock (SyncedMap) { if (SyncedMap.ContainsKey(sessionId)) { SyncedMap[sessionId] = val; } else { SyncedMap.Add(sessionId, val); } } TriggerPropChange(nameof(SyncedMap)); TriggerPropChange(nameof(IsSynced)); }