예제 #1
0
        public void Remove(Guid guid)
        {
            Games.Remove(guid);

            GamePoolEvent?.Invoke(this,
                                  new PropertyChangedEventArgs(nameof(Game)));
        }
예제 #2
0
        public Guid Add(string name, string gamePing, Guid adminGuid)
        {
            Guid newGuid = Guid.NewGuid();

            Game g = new Game(name, gamePing, newGuid, adminGuid);

            Games.Add(newGuid, g);

            //Log.Information("GamePool: New game added to game pool '{0}'", newGame.Name);

            GamePoolEvent?.Invoke(this,
                                  new PropertyChangedEventArgs(nameof(Game)));

            return(newGuid);
        }