/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { unchecked { int result = (SteamUserId != null ? SteamUserId.GetHashCode() : 0); result = (result * 397) ^ Closed.GetHashCode(); result = (result * 397) ^ (Achievement != null ? Achievement.GetHashCode() : 0); result = (result * 397) ^ Date.GetHashCode(); return(result); } }
public int GenerateAsagiHash() { unchecked { int hashCode = Sticky.GetHashCode(); hashCode = (hashCode * 397) ^ Closed.GetHashCode(); hashCode = (hashCode * 397) ^ (Comment?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (OriginalFilename?.GetHashCode() ?? 0); return(hashCode); } }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { unchecked { int result = (SteamUserId != null ? SteamUserId.GetHashCode() : 0); result = (result * 397) ^ (Name != null ? Name.GetHashCode() : 0); result = (result * 397) ^ (Description != null ? Description.GetHashCode() : 0); result = (result * 397) ^ (ImageUrl != null ? ImageUrl.GetHashCode() : 0); result = (result * 397) ^ Closed.GetHashCode(); /*result = (result*397) ^ (Game != null ? Game.GetHashCode() : 0);*/ result = (result * 397) ^ Date.GetHashCode(); return(result); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { var hash = 41; // Suitable nullity checks etc, of course :) if (AccountId != null) { hash = hash * 59 + AccountId.GetHashCode(); } if (Orc != null) { hash = hash * 59 + Orc.GetHashCode(); } if (Closed != null) { hash = hash * 59 + Closed.GetHashCode(); } if (Id != null) { hash = hash * 59 + Id.GetHashCode(); } if (FullImage != null) { hash = hash * 59 + FullImage.GetHashCode(); } return(hash); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Date != null) { hashCode = hashCode * 59 + Date.GetHashCode(); } if (Closed != null) { hashCode = hashCode * 59 + Closed.GetHashCode(); } if (StartTime != null) { hashCode = hashCode * 59 + StartTime.GetHashCode(); } if (EndTime != null) { hashCode = hashCode * 59 + EndTime.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (LastModifiedTimestampMs != 0L) { hash ^= LastModifiedTimestampMs.GetHashCode(); } if (Latitude != 0D) { hash ^= Latitude.GetHashCode(); } if (Longitude != 0D) { hash ^= Longitude.GetHashCode(); } if (OwnedByTeam != 0) { hash ^= OwnedByTeam.GetHashCode(); } if (GuardPokemonId != 0) { hash ^= GuardPokemonId.GetHashCode(); } if (GuardPokemonCp != 0) { hash ^= GuardPokemonCp.GetHashCode(); } if (Enabled != false) { hash ^= Enabled.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (GymPoints != 0L) { hash ^= GymPoints.GetHashCode(); } if (IsInBattle != false) { hash ^= IsInBattle.GetHashCode(); } hash ^= activeFortModifier_.GetHashCode(); if (lureInfo_ != null) { hash ^= LureInfo.GetHashCode(); } if (CooldownCompleteTimestampMs != 0L) { hash ^= CooldownCompleteTimestampMs.GetHashCode(); } if (Sponsor != 0) { hash ^= Sponsor.GetHashCode(); } if (RenderingType != 0) { hash ^= RenderingType.GetHashCode(); } if (DeployLockoutEndMs != 0L) { hash ^= DeployLockoutEndMs.GetHashCode(); } if (guardPokemonDisplay_ != null) { hash ^= GuardPokemonDisplay.GetHashCode(); } if (Closed != false) { hash ^= Closed.GetHashCode(); } if (raidInfo_ != null) { hash ^= RaidInfo.GetHashCode(); } if (gymDisplay_ != null) { hash ^= GymDisplay.GetHashCode(); } if (Visited != false) { hash ^= Visited.GetHashCode(); } if (SameTeamDeployLockoutEndMs != 0L) { hash ^= SameTeamDeployLockoutEndMs.GetHashCode(); } if (AllowCheckin != false) { hash ^= AllowCheckin.GetHashCode(); } if (ImageUrl.Length != 0) { hash ^= ImageUrl.GetHashCode(); } if (InEvent != false) { hash ^= InEvent.GetHashCode(); } if (BannerUrl.Length != 0) { hash ^= BannerUrl.GetHashCode(); } return(hash); }