Esempio n. 1
0
        public void Change(int id, GameServerInformation gameServerInformation)
        {
            lock (locker)
            {
                if (!gameServersInformation.ContainsKey(id))
                {
                    LogUtils.Log(MessageBuilder.Trace($"A game server with id #{id} does not exist in a storage."));
                    return;
                }

                gameServersInformation[id] = gameServerInformation;
            }
        }
Esempio n. 2
0
        public void Add(int id, GameServerInformation gameServerInformation)
        {
            lock (locker)
            {
                if (gameServersInformation.ContainsKey(id))
                {
                    LogUtils.Log(MessageBuilder.Trace($"A game server with id #{id} already exists in a storage."));
                    return;
                }

                LogUtils.Log($"Added a game server with id #{id}");

                gameServersInformation.Add(id, gameServerInformation);
            }
        }