Пример #1
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()
 {
     unchecked
     {
         return((IsValid.GetHashCode() * 397) ^ (ErrorMessage != null ? ErrorMessage.GetHashCode() : 0));
     }
 }
Пример #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((IsValid.GetHashCode() * 397) ^ (Value != null ? Value.GetHashCode() : 0));
     }
 }
Пример #3
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (isValid_ != null)
        {
            hash ^= IsValid.GetHashCode();
        }
        if (CountryCode.Length != 0)
        {
            hash ^= CountryCode.GetHashCode();
        }
        if (Userid.Length != 0)
        {
            hash ^= Userid.GetHashCode();
        }
        if (TrialURL.Length != 0)
        {
            hash ^= TrialURL.GetHashCode();
        }
        if (ErrorMessage.Length != 0)
        {
            hash ^= ErrorMessage.GetHashCode();
        }
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }
Пример #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()
 {
     unchecked
     {
         return(((errors != null ? errors.GetHashCode() : 0) * 397) ^ IsValid.GetHashCode());
     }
 }
Пример #5
0
        public override int GetHashCode()
        {
            int result = WeightedLength;

            result = 31 * result + Permillage;
            result = 31 * result + IsValid.GetHashCode();
            result = 31 * result + DisplayTextRange.GetHashCode();
            result = 31 * result + ValidTextRange.GetHashCode();
            return(result);
        }
Пример #6
0
        /// <inheritdoc />
        public override int GetHashCode()
        {
            unchecked
            {
#if NETSTANDARD2_0
                return(IsValid.GetHashCode() ^ Reason.GetHashCode());
#else
                return(IsValid.GetHashCode() ^ Reason.GetHashCode(StringComparison.Ordinal));
#endif
            }
        }
Пример #7
0
        public override bool Equals(object obj) => this.ToString() == obj.ToString(); // hack

        public override int GetHashCode()
        {
            var hashCode = -1141250687;

            hashCode = hashCode * -1521134295 + EqualityComparer <IEnumerable <Error> > .Default.GetHashCode(Errors);

            hashCode = hashCode * -1521134295 + EqualityComparer <T> .Default.GetHashCode(Value);

            hashCode = hashCode * -1521134295 + IsValid.GetHashCode();
            return(hashCode);
        }
Пример #8
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 (IsValid != null)
         {
             hashCode = hashCode * 59 + IsValid.GetHashCode();
         }
         if (IsAccount != null)
         {
             hashCode = hashCode * 59 + IsAccount.GetHashCode();
         }
         if (IsBlacklisted != null)
         {
             hashCode = hashCode * 59 + IsBlacklisted.GetHashCode();
         }
         if (Avatar != null)
         {
             hashCode = hashCode * 59 + Avatar.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (AccountNumber != null)
         {
             hashCode = hashCode * 59 + AccountNumber.GetHashCode();
         }
         if (CorrectAddress != null)
         {
             hashCode = hashCode * 59 + CorrectAddress.GetHashCode();
         }
         if (MemoExpected != null)
         {
             hashCode = hashCode * 59 + MemoExpected.GetHashCode();
         }
         if (MemoPlaceholderText != null)
         {
             hashCode = hashCode * 59 + MemoPlaceholderText.GetHashCode();
         }
         if (SimilarToExistingService != null)
         {
             hashCode = hashCode * 59 + SimilarToExistingService.GetHashCode();
         }
         if (Balances != null)
         {
             hashCode = hashCode * 59 + Balances.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #9
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)DateType;
         hashCode = (hashCode * 397) ^ (DateFrom?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (DateTo?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (DatePhrase?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ IsValid.GetHashCode();
         hashCode = (hashCode * 397) ^ SortDate;
         return(hashCode);
     }
 }
Пример #10
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = FindPredicate.GetHashCode();
         result = (result * 397) ^ Document.GetHashCode();
         result = (result * 397) ^ Bookmark.GetHashCode();
         result = (result * 397) ^ FindMatch.GetHashCode();
         result = (result * 397) ^ IsValid.GetHashCode();
         result = (result * 397) ^ LocationName.GetHashCode();
         result = (result * 397) ^ LocationType.GetHashCode();
         return(result);
     }
 }
Пример #11
0
        public override int GetHashCode()
        {
            var hashCode = 1750933667;

            hashCode = hashCode * -1521134295 + EqualityComparer <IntAlias <PolygonGrid2D> > .Default.GetHashCode(ShapeContainer);

            hashCode = hashCode * -1521134295 + EqualityComparer <PolygonGrid2D> .Default.GetHashCode(Shape);

            hashCode = hashCode * -1521134295 + EqualityComparer <Vector2Int> .Default.GetHashCode(Position);

            hashCode = hashCode * -1521134295 + EqualityComparer <TEnergyData> .Default.GetHashCode(EnergyData);

            hashCode = hashCode * -1521134295 + IsValid.GetHashCode();
            return(hashCode);
        }
 /// <summary>Serves as the default hash function. </summary>
 /// <returns>A hash code for the current object.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = IsValid.GetHashCode();
         hashCode = (hashCode * 397) ^ (RelativeLocation?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AbsoluteLocation?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (InstanceLocation?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AnnotationValue?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Keyword?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AdditionalInfo?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (NestedResults?.GetCollectionHashCode() ?? 0);
         return(hashCode);
     }
 }
Пример #13
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (query_ != null)
            {
                hash ^= Query.GetHashCode();
            }
            if (IsValid != false)
            {
                hash ^= IsValid.GetHashCode();
            }
            hash ^= data_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 public override int GetHashCode()
 {
     return(IsValid.GetHashCode() ^ ErrorCode.GetHashCode());
 }
Пример #15
0
 public override int GetHashCode()
 {
     return(IsValid.GetHashCode() ^ Coords.GetHashCode() ^ PhotoID);
 }
Пример #16
0
 /// <summary>
 /// Returns a value that represents the hash code of this structure.
 /// </summary>
 /// <returns>
 /// Hash code of this structure.
 /// </returns>
 public override int GetHashCode() => DeviceId.GetHashCode() ^ IsValid.GetHashCode() ^ RawEdid.GetHashCode();
Пример #17
0
 /// <summary>Returns the hash code for this <see cref="StringValidationResult" />.</summary>
 /// <returns>The hash code for this <see cref="StringValidationResult" />.</returns>
 public override int GetHashCode() => IsValid.GetHashCode() * 31 + ErrorContent.GetHashCode();
Пример #18
0
 public override int GetHashCode() => IsValid.GetHashCode() ^ ErrorMessages.GetHashCode();
Пример #19
0
 /// <summary>
 ///     Hash function for ValidationResult
 /// </summary>
 /// <returns>hash code for the current ValidationResult</returns>
 public override int GetHashCode()
 {
     return(IsValid.GetHashCode() ^ ((ErrorContent == null) ? int.MinValue : ErrorContent).GetHashCode());
 }