protected internal void CacheProperties(Hashtable propertiesToCache) { if (((propertiesToCache != null) && (propertiesToCache.Count != 0)) && !CustomProperties.Equals(propertiesToCache)) { if (propertiesToCache.CheckKey(RoomProperty.RemovedFromList, out bool removed, true)) { RemovedFromList = removed; } if (propertiesToCache.CheckKey(RoomProperty.MaxPlayers, out byte max, true)) { maxPlayersField = max; } if (propertiesToCache.CheckKey(RoomProperty.Visibility, out bool visible, true)) { visibleField = visible; } if (propertiesToCache.CheckKey(RoomProperty.Joinable, out bool joinable, true)) { openField = joinable; } if (propertiesToCache.CheckKey(RoomProperty.PlayerCount, out byte players, true)) { PlayerCount = players; } if (propertiesToCache.CheckKey(RoomProperty.CleanUpCacheOnLeave, out bool cleanup, true)) { autoCleanUpField = cleanup; } CustomProperties.MergeStringKeys(propertiesToCache); } }