Example #1
0
        public bool Equals(Result other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(GameBaseVariantId.Equals(other.GameBaseVariantId) &&
                   Equals(GameVariant, other.GameVariant) &&
                   HopperId.Equals(other.HopperId) &&
                   Equals(Id, other.Id) &&
                   IsTeamGame == other.IsTeamGame &&
                   Links.OrderBy(l => l.Key).SequenceEqual(other.Links.OrderBy(l => l.Key)) &&
                   MapId.Equals(other.MapId) &&
                   Equals(MapVariant, other.MapVariant) &&
                   Equals(MatchCompletedDate, other.MatchCompletedDate) &&
                   MatchDuration.Equals(other.MatchDuration) &&
                   Players.OrderBy(p => p.Identity.Gamertag).SequenceEqual(other.Players.OrderBy(p => p.Identity.Gamertag)) &&
                   SeasonId.Equals(other.SeasonId) &&
                   MatchCompletedDateFidelity == other.MatchCompletedDateFidelity &&
                   Teams.OrderBy(t => t.Id).SequenceEqual(other.Teams.OrderBy(t => t.Id)));
        }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = GameBaseVariantId.GetHashCode();
         hashCode = (hashCode * 397) ^ GameBaseVariantRank;
         hashCode = (hashCode * 397) ^ NumberOfMatchesCompleted;
         hashCode = (hashCode * 397) ^ NumberOfMatchesWon;
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (FlexibleStats?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ GameBaseVariantId.GetHashCode();
         hashCode = (hashCode * 397) ^ MapId.GetHashCode();
         hashCode = (hashCode * 397) ^ TotalPiesEarned;
         return(hashCode);
     }
 }
Example #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ContentId.GetHashCode();
         hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ GameBaseVariantId.GetHashCode();
         hashCode = (hashCode * 397) ^ (IconUrl?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Example #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = GameBaseVariantId.GetHashCode();
         hashCode = (hashCode * 397) ^ GameVariantId.GetHashCode();
         hashCode = (hashCode * 397) ^ IsMatchOver.GetHashCode();
         hashCode = (hashCode * 397) ^ IsTeamGame.GetHashCode();
         hashCode = (hashCode * 397) ^ MapId.GetHashCode();
         hashCode = (hashCode * 397) ^ MapVariantId.GetHashCode();
         hashCode = (hashCode * 397) ^ PlaylistId.GetHashCode();
         hashCode = (hashCode * 397) ^ SeasonId.GetHashCode();
         hashCode = (hashCode * 397) ^ TotalDuration.GetHashCode();
         return(hashCode);
     }
 }
Example #6
0
        public bool Equals(TopGameBaseVariant other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(GameBaseVariantId.Equals(other.GameBaseVariantId) &&
                   GameBaseVariantRank == other.GameBaseVariantRank &&
                   NumberOfMatchesCompleted == other.NumberOfMatchesCompleted &&
                   NumberOfMatchesWon == other.NumberOfMatchesWon);
        }
        public bool Equals(ScenarioStat other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(base.Equals(other) &&
                   Equals(FlexibleStats, other.FlexibleStats) &&
                   GameBaseVariantId.Equals(other.GameBaseVariantId) &&
                   MapId.Equals(other.MapId) &&
                   TotalPiesEarned == other.TotalPiesEarned);
        }
Example #8
0
        public bool Equals(GameVariant other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(ContentId.Equals(other.ContentId) &&
                   string.Equals(Description, other.Description) &&
                   GameBaseVariantId.Equals(other.GameBaseVariantId) &&
                   string.Equals(IconUrl, other.IconUrl) &&
                   Id.Equals(other.Id) &&
                   string.Equals(Name, other.Name));
        }
Example #9
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = GameBaseVariantId.GetHashCode();
         hashCode = (hashCode * 397) ^ (GameVariant?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ HopperId.GetHashCode();
         hashCode = (hashCode * 397) ^ (Id?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ IsTeamGame.GetHashCode();
         hashCode = (hashCode * 397) ^ (Links?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ MapId.GetHashCode();
         hashCode = (hashCode * 397) ^ (MapVariant?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MatchCompletedDate?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ MatchDuration.GetHashCode();
         hashCode = (hashCode * 397) ^ (Players?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ SeasonId.GetHashCode();
         hashCode = (hashCode * 397) ^ MatchCompletedDateFidelity;
         hashCode = (hashCode * 397) ^ (Teams?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Example #10
0
        public bool Equals(BaseMatch other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(GameBaseVariantId.Equals(other.GameBaseVariantId) &&
                   GameVariantId.Equals(other.GameVariantId) &&
                   IsMatchOver == other.IsMatchOver &&
                   IsTeamGame == other.IsTeamGame &&
                   MapId.Equals(other.MapId) &&
                   MapVariantId.Equals(other.MapVariantId) &&
                   PlaylistId.Equals(other.PlaylistId) &&
                   SeasonId.Equals(other.SeasonId) &&
                   TotalDuration.Equals(other.TotalDuration));
        }