Exemple #1
0
 public override int GetHashCode()
 {
     return(Name.GetHashCode() +
            Id.GetHashCode() +
            CreatedDate.GetHashCode() +
            orders.Sum(x => x.GetHashCode()));
 }
 public override int GetHashCode()
 {
     unchecked
     {
         return((Id * 397) ^ CreatedDate.GetHashCode());
     }
 }
Exemple #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Id.GetHashCode() * 397) ^ (CreatedDate != null ? CreatedDate.GetHashCode() : 0));
     }
 }
Exemple #4
0
        /// <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( )
        {
            int hash = 13;

            hash = hash * 7 + Id.GetHashCode( );

            if (Name != null)
            {
                hash = hash * 7 + Name.GetHashCode( );
            }

            if (Description != null)
            {
                hash = hash * 7 + Description.GetHashCode( );
            }

            if (CreatedDate != null)
            {
                hash = hash * 7 + CreatedDate.GetHashCode( );
            }

            if (ModifiedDate != null)
            {
                hash = hash * 7 + ModifiedDate.GetHashCode( );
            }

            return(hash);
        }
Exemple #5
0
        public override int GetHashCode()
        {
            var hashCode = -404744490;

            hashCode = hashCode * -1521134295 + CreatedDate.GetHashCode();
            hashCode = hashCode * -1521134295 + Active.GetHashCode();
            return(hashCode);
        }
Exemple #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = (Leaves != null ? Leaves.GetHashCode() : 0);
         result = (result * 397) ^ CreatedDate.GetHashCode();
         result = (result * 397) ^ Id.GetHashCode();
         result = (result * 397) ^ (Titles != null ? Titles.GetHashCode() : 0);
         result = (result * 397) ^ (Friend != null ? Friend.GetHashCode() : 0);
         return(result);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (Site != null ? Site.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Url != null ? Url.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CreatedDate.GetHashCode();
         hashCode = (hashCode * 397) ^ (BookmarkTags != null ? BookmarkTags.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemple #8
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CreatedDate.GetHashCode();
         hashCode = (hashCode * 397) ^ (CurrencyInfo != null ? CurrencyInfo.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ _override.GetHashCode();
         hashCode = (hashCode * 397) ^ _places.GetHashCode();
         hashCode = (hashCode * 397) ^ _units.GetHashCode();
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = ModuleId;
         hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Version?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ IsEntry.GetHashCode();
         hashCode = (hashCode * 397) ^ CreatedDate.GetHashCode();
         hashCode = (hashCode * 397) ^ ModifiedDate.GetHashCode();
         hashCode = (hashCode * 397) ^ (Data?.GetCollectionHashCode() ?? 0);
         return(hashCode);
     }
 }
Exemple #10
0
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = ModuleId;
         hashCode = (hashCode * 397) ^ (Name == null ? 0 : Name.GetHashCode());
         hashCode = (hashCode * 397) ^ (Version == null ? 0 : Version.GetHashCode());
         hashCode = (hashCode * 397) ^ IsEntry.GetHashCode();
         hashCode = (hashCode * 397) ^ CreatedDate.GetHashCode();
         hashCode = (hashCode * 397) ^ ModifiedDate.GetHashCode();
         hashCode = (hashCode * 397) ^ (Data == null ? 0 : Data.GetCollectionHashCode());
         return(hashCode);
     }
 }
Exemple #11
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (Team1 != null ? Team1.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Team2 != null ? Team2.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)GameState;
         hashCode = (hashCode * 397) ^ IsComplete.GetHashCode();
         hashCode = (hashCode * 397) ^ (WinningTeam != null ? WinningTeam.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsSimulatedGame.GetHashCode();
         hashCode = (hashCode * 397) ^ CreatedDate.GetHashCode();
         return(hashCode);
     }
 }
Exemple #12
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Title != null)
         {
             hashCode = hashCode * 59 + Title.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Importance != null)
         {
             hashCode = hashCode * 59 + Importance.GetHashCode();
         }
         if (CreatedDate != null)
         {
             hashCode = hashCode * 59 + CreatedDate.GetHashCode();
         }
         if (DueDate != null)
         {
             hashCode = hashCode * 59 + DueDate.GetHashCode();
         }
         if (FinishedDate != null)
         {
             hashCode = hashCode * 59 + FinishedDate.GetHashCode();
         }
         if (Finished != null)
         {
             hashCode = hashCode * 59 + Finished.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemple #13
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (createdDate_ != null)
            {
                hash ^= CreatedDate.GetHashCode();
            }
            if (payload_ != null)
            {
                hash ^= Payload.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #14
0
        /// <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
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + Id.GetHashCode();

                if (HistoryText != null)
                {
                    hash = hash * 59 + HistoryText.GetHashCode();
                }

                if (CreatedDate != null)
                {
                    hash = hash * 59 + CreatedDate.GetHashCode();
                }

                return(hash);
            }
        }