Пример #1
0
        public static bool RemovePlayer(Player player)
        {
            bool result = false;

            Monitor.Enter(useLock);
            Player realPlayer = GetInstance().FirstOrDefault(p => p.Nickname == player.Nickname);

            if (realPlayer != null && !realPlayer.IsLogged())
            {
                result = GetInstance().Remove(player);
            }
            Monitor.Exit(useLock);
            return(result);
        }