public bool Equals(HandNumberPokerSiteKey obj) { if (obj == null) { return(false); } return(HandNumber == obj.HandNumber && PokerSite == obj.PokerSite); }
/// <summary> /// Update <see cref="Playerstatistic.MaxPlayers"/> in the specified <see cref="Playerstatistic"/>, then save it to the specified file /// </summary> /// <param name="file">File to save updated player statistic</param> /// <param name="stat"><see cref="Playerstatistic"/> to update</param> private void ProcessPlayerStatistic(StreamWriter streamWriter, Playerstatistic stat) { var handNumberPokerSiteKey = new HandNumberPokerSiteKey(stat.GameNumber, stat.PokersiteId); if (!handHistoryNumberTableSize.ContainsKey(handNumberPokerSiteKey)) { LogProvider.Log.Warn(this, $"Hand hasn't been found in db. It will be saved as is. Hand={stat.GameNumber}, PokerSite={(EnumPokerSites)stat.PokersiteId}"); return; } var tableSize = handHistoryNumberTableSize[handNumberPokerSiteKey]; stat.MaxPlayers = tableSize; StorePlayerStatistic(streamWriter, stat); }