GetHashCode() public method

public GetHashCode ( ) : int
return int
Esempio n. 1
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 (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (PhoneNumber != null)
         {
             hashCode = hashCode * 59 + PhoneNumber.GetHashCode();
         }
         if (EmailID != null)
         {
             hashCode = hashCode * 59 + EmailID.GetHashCode();
         }
         if (Rating != null)
         {
             hashCode = hashCode * 59 + Rating.GetHashCode();
         }
         return(hashCode);
     }
 }
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (BuyerId?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PrimaryPhone?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (SecondaryPhone?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Fax?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (WebSite?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Company?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AnnualTurnOver?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (LegalRepresentative?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Rating?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (CreditInsurance.GetHashCode());
            hashCode = hashCode * -1521134295 + (Logo?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AddressOne?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AddressTwo?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (VatNumber?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ContactPerson?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Prefix?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Temp?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (UserName?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PasswordHash?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (SecurityStamp?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (EmailConfirmed.GetHashCode());
            hashCode = hashCode * -1521134295 + (LockoutEnabled.GetHashCode());
            hashCode = hashCode * -1521134295 + (PhoneNumberConfirmed.GetHashCode());
            hashCode = hashCode * -1521134295 + (TwoFactorEnabled.GetHashCode());
            hashCode = hashCode * -1521134295 + (AccessFailedCount?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Name?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Email?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PhoneNumber?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (LockoutEndDate?.GetHashCode() ?? 0);
            return(hashCode);
        }
Esempio n. 3
0
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = TrackId;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Artist != null ? Artist.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (AlbumArtist != null ? AlbumArtist.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Composer != null ? Composer.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Album != null ? Album.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Genre != null ? Genre.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Kind != null ? Kind.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Size.GetHashCode();
         hashCode = (hashCode * 397) ^ (PlayingTime != null ? PlayingTime.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ TrackNumber.GetHashCode();
         hashCode = (hashCode * 397) ^ Year.GetHashCode();
         hashCode = (hashCode * 397) ^ DateModified.GetHashCode();
         hashCode = (hashCode * 397) ^ DateAdded.GetHashCode();
         hashCode = (hashCode * 397) ^ BitRate.GetHashCode();
         hashCode = (hashCode * 397) ^ SampleRate.GetHashCode();
         hashCode = (hashCode * 397) ^ PlayCount.GetHashCode();
         hashCode = (hashCode * 397) ^ PlayDate.GetHashCode();
         hashCode = (hashCode * 397) ^ PartOfCompilation.GetHashCode();
         hashCode = (hashCode * 397) ^ (Location != null ? Location.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Rating.GetHashCode();
         hashCode = (hashCode * 397) ^ AlbumRating.GetHashCode();
         hashCode = (hashCode * 397) ^ AlbumRatingComputed.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 4
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 (EventId != null)
         {
             hashCode = hashCode * 59 + EventId.GetHashCode();
         }
         if (Topic != null)
         {
             hashCode = hashCode * 59 + Topic.GetHashCode();
         }
         if (Rating != null)
         {
             hashCode = hashCode * 59 + Rating.GetHashCode();
         }
         if (Comment != null)
         {
             hashCode = hashCode * 59 + Comment.GetHashCode();
         }
         if (Sentiment != null)
         {
             hashCode = hashCode * 59 + Sentiment.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 5
0
        public override int GetHashCode()
        {
            int result = (Name != null ? Name.GetHashCode() : 0);

            result = (result * 397) ^ Rating.GetHashCode();
            result = (result * 397) ^ Genre.GetHashCode();
            return(result);
        }
        public override int GetHashCode()
        {
            int result;

            result = rating.GetHashCode();
            result = 29 * result + (text != null ? text.GetHashCode() : 0);
            result = 29 * result + created.GetHashCode();
            return(result);
        }
Esempio n. 7
0
        public override int GetHashCode()
        {
            var hashCode = 2004589807;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Naam);

            hashCode = hashCode * -1521134295 + Rugnummer.GetHashCode();
            hashCode = hashCode * -1521134295 + Rating.GetHashCode();
            return(hashCode);
        }
Esempio n. 8
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (LastModifiedDate != null ? LastModifiedDate.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Rating.GetHashCode();
         hashCode = (hashCode * 397) ^ Variance.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 9
0
 public override int GetHashCode()
 {
     return(Id.GetHashCode()
            ^ Name.GetHashCode()
            ^ NumJobs.GetHashCode()
            ^ SquareLogo.GetHashCode()
            ^ Rating.GetHashCode()
            ^ NumberOfReviews.GetHashCode()
            ^ StarImageSrc.GetHashCode()
            ^ ReviewsUrl.GetHashCode());
 }
Esempio n. 10
0
        public override int GetHashCode()
        {
            var hashCode = -1159705276;

            hashCode = hashCode * -1521134295 + reviewerId.GetHashCode();
            hashCode = hashCode * -1521134295 + restaurantId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ReviewerName);

            hashCode = hashCode * -1521134295 + Rating.GetHashCode();
            hashCode = hashCode * -1521134295 + Date.GetHashCode();
            return(hashCode);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            hash ^= Identity.GetHashCode();
            if (Rating != 0D)
            {
                hash ^= Rating.GetHashCode();
            }
            hash ^= attribute_.GetHashCode();
            return(hash);
        }
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AgencyCode?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AgencyDescription?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AgencyAddress?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (IsSelected.GetHashCode());
            hashCode = hashCode * -1521134295 + (Rating?.GetHashCode() ?? 0);
            return(hashCode);
        }
Esempio n. 13
0
        public override int GetHashCode()
        {
            var hash = 2108858624 * (string.IsNullOrEmpty(Title) ? Title.GetHashCode() : 1);

            hash *= (string.IsNullOrEmpty(Notes) ? Notes.GetHashCode() : 1);
            hash *= Latitude != 0 ? Latitude.GetHashCode() : 1;
            hash *= Longitude != 0 ? Longitude.GetHashCode() : 1;
            hash *= Rating != 0 ? Rating.GetHashCode() : 1;
            hash *= Date.GetHashCode();

            return(hash);
        }
Esempio n. 14
0
 public override int GetHashCode()
 {
     unchecked {
         const int randomPrime = 397;
         int       hashCode    = Id.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ DocumentId.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ Rating.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ CreatedBy.GetHashCode();
         hashCode = (hashCode * randomPrime) ^ CreatedAt.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 15
0
 /// <summary>Serves as a hash function for a particular type.</summary>
 /// <returns>A hash code for the current <see cref="T:System.Object" />.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = (Id != null ? Id.GetHashCode() : 0);
         result = (result * 397) ^ (Title != null ? Title.GetHashCode() : 0);
         result = (result * 397) ^ Rating.GetHashCode();
         result = (result * 397) ^ (Director != null ? Director.GetHashCode() : 0);
         result = (result * 397) ^ ReleaseDate.GetHashCode();
         result = (result * 397) ^ (TagLine != null ? TagLine.GetHashCode() : 0);
         result = (result * 397) ^ (Genres != null ? Genres.GetHashCode() : 0);
         return(result);
     }
 }
Esempio n. 16
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (Comments == null ? 0 : Comments.GetHashCode());
         hash = hash * 23 + (EmailAddress == null ? 0 : EmailAddress.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (ProductId == default(int) ? 0 : ProductId.GetHashCode());
         hash = hash * 23 + (Rating == default(int) ? 0 : Rating.GetHashCode());
         hash = hash * 23 + (ReviewDate == default(DateTime) ? 0 : ReviewDate.GetHashCode());
         hash = hash * 23 + (ReviewerName == null ? 0 : ReviewerName.GetHashCode());
         return(hash);
     }
 }
Esempio n. 17
0
        public override int GetHashCode()
        {
            var hashCode = -2037718333;

            hashCode = hashCode * -1521134295 + ReviewId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(UserName);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Body);

            hashCode = hashCode * -1521134295 + Rating.GetHashCode();
            hashCode = hashCode * -1521134295 + ItemId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <Item> .Default.GetHashCode(Item);

            return(hashCode);
        }
Esempio n. 18
0
        public override int GetHashCode()
        {
            var hashCode = -1455158527;

            hashCode *= -1521134295 + EqualityComparer <Guid> .Default.GetHashCode(Id);

            hashCode *= -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode *= -1521134295 + EqualityComparer <string> .Default.GetHashCode(Address);

            hashCode *= -1521134295 + EqualityComparer <string> .Default.GetHashCode(Description);

            hashCode *= -1521134295 + StandardPricePerRoom.GetHashCode();
            hashCode *= -1521134295 + Rating.GetHashCode();
            return(hashCode);
        }
Esempio n. 19
0
        public override int GetHashCode()
        {
            var hash       = 13;
            var hashFactor = 7;

            hash = Id.GetHashCode(hash, hashFactor);
            hash = Artist.GetHashCode(hash, hashFactor);
            hash = Genre.GetHashCode(hash, hashFactor);
            hash = hash * hashFactor + Year.GetHashCode();
            hash = hash * hashFactor + Rating.GetHashCode();
            hash = hash * hashFactor + Starred.GetHashCode();
            hash = hash * hashFactor + AlbumArtSize.GetHashCode();
            hash = CoverArt.GetHashCode(hash, hashFactor);
            hash = hash * hashFactor + Child.GetHashCode();

            return(hash);
        }
Esempio n. 20
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()
        {
            // As obtained from the Jon Skeet answer to:
            // http://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode
            // And adapted towards the Modified Bernstein (shown here: http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx)
            //
            // Overflow is fine, just wrap
            unchecked
            {
                // Pick a random prime number
                int hash = 17;

                // Mash the hash together with yet another random prime number
                hash = (hash * 23) ^ Rating.GetHashCode();
                return(hash);
            }
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (videoId_ != null)
            {
                hash ^= VideoId.GetHashCode();
            }
            if (userId_ != null)
            {
                hash ^= UserId.GetHashCode();
            }
            if (Rating != 0)
            {
                hash ^= Rating.GetHashCode();
            }
            if (ratingTimestamp_ != null)
            {
                hash ^= RatingTimestamp.GetHashCode();
            }
            return(hash);
        }
Esempio n. 22
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 (ProductReviewID != null)
         {
             hashCode = hashCode * 59 + ProductReviewID.GetHashCode();
         }
         if (ProductId != null)
         {
             hashCode = hashCode * 59 + ProductId.GetHashCode();
         }
         if (ReviewerName != null)
         {
             hashCode = hashCode * 59 + ReviewerName.GetHashCode();
         }
         if (ReviewDate != null)
         {
             hashCode = hashCode * 59 + ReviewDate.GetHashCode();
         }
         if (EmailAddress != null)
         {
             hashCode = hashCode * 59 + EmailAddress.GetHashCode();
         }
         if (Rating != null)
         {
             hashCode = hashCode * 59 + Rating.GetHashCode();
         }
         if (Comments != null)
         {
             hashCode = hashCode * 59 + Comments.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 23
0
        public override int GetHashCode()
        {
            var hashCode = 1156222695;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Type);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Id);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Url);

            hashCode = hashCode * -1521134295 + Rating.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(SourceSite);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(SourceUrl);

            hashCode = hashCode * -1521134295 + ImportTime.GetHashCode();
            hashCode = hashCode * -1521134295 + TrendingTime.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ShortDirectUrl);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(DirectUrl);

            return(hashCode);
        }
Esempio n. 24
0
 public override int GetHashCode()
 {
     return(Rating.GetHashCode() + PostedDateTime.GetHashCode() + Comment.GetHashCode() +
            ReviewNumber.GetHashCode() + ReviewUser.GetHashCode());
 }
Esempio n. 25
0
 public override int GetHashCode()
 {
     return(name.GetHashCode() + rating.GetHashCode() + genre.GetHashCode());
 }
 public override int GetHashCode()
 {
     return(Comment.GetHashCode() + DateTimePosted.GetHashCode() + Rating.GetHashCode() + RestaurantId.GetHashCode());
 }