Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CardsFixedAtLevel?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (ComputerDifficulty != null ? ComputerDifficulty.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DisplayInfo != null ? DisplayInfo.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Hide.GetHashCode();
         hashCode = (hashCode * 397) ^ (Id?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Image != null ? Image.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsNew.GetHashCode();
         hashCode = (hashCode * 397) ^ IsQuickmatchPlaylist.GetHashCode();
         hashCode = (hashCode * 397) ^ IsTeamGamePlaylist.GetHashCode();
         hashCode = (hashCode * 397) ^ LonelyPartyUsesWildcard.GetHashCode();
         hashCode = (hashCode * 397) ^ MatchTicketTimeoutDurationSeconds;
         hashCode = (hashCode * 397) ^ MaxPartySize;
         hashCode = (hashCode * 397) ^ MaxPlayerCount;
         hashCode = (hashCode * 397) ^ MinPartySize;
         hashCode = (hashCode * 397) ^ MinPlayerCount;
         hashCode = (hashCode * 397) ^ (MpsdHopperName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MpsdHopperStatName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (PlaylistEntries?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (StatsClassification?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (TargetPlatform?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ThumbnailImage != null ? ThumbnailImage.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ UsesBanRules.GetHashCode();
         hashCode = (hashCode * 397) ^ Voting.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        public bool Equals(Playlist other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Equals(CardsFixedAtLevel, other.CardsFixedAtLevel) &&
                   Equals(ComputerDifficulty, other.ComputerDifficulty) &&
                   Equals(DisplayInfo, other.DisplayInfo) &&
                   Hide == other.Hide &&
                   string.Equals(Id, other.Id) &&
                   Equals(Image, other.Image) &&
                   IsNew == other.IsNew &&
                   IsQuickmatchPlaylist == other.IsQuickmatchPlaylist &&
                   IsTeamGamePlaylist == other.IsTeamGamePlaylist &&
                   LonelyPartyUsesWildcard == other.LonelyPartyUsesWildcard &&
                   MatchTicketTimeoutDurationSeconds == other.MatchTicketTimeoutDurationSeconds &&
                   MaxPartySize == other.MaxPartySize &&
                   MaxPlayerCount == other.MaxPlayerCount &&
                   MinPartySize == other.MinPartySize &&
                   MinPlayerCount == other.MinPlayerCount &&
                   string.Equals(MpsdHopperName, other.MpsdHopperName) &&
                   string.Equals(MpsdHopperStatName, other.MpsdHopperStatName) &&
                   PlaylistEntries.OrderBy(pe => pe.Id).SequenceEqual(other.PlaylistEntries.OrderBy(pe => pe.Id)) &&
                   string.Equals(StatsClassification, other.StatsClassification) &&
                   string.Equals(TargetPlatform, other.TargetPlatform) &&
                   Equals(ThumbnailImage, other.ThumbnailImage) &&
                   UsesBanRules == other.UsesBanRules &&
                   Voting == other.Voting);
        }
Exemplo n.º 3
0
 public List <string> GetTracksPaths() => PlaylistEntries.Select(x => x.Location.FirstOrDefault()).Where(x => x != null).ToList();