public void Remove(Guid guid) { Games.Remove(guid); GamePoolEvent?.Invoke(this, new PropertyChangedEventArgs(nameof(Game))); }
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); }