Esempio n. 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((Label != null ? Label.GetHashCode() : 0) * 397) ^ Confidence.GetHashCode());
     }
 }
 /// <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 (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (IsCompatible != null)
         {
             hashCode = hashCode * 59 + IsCompatible.GetHashCode();
         }
         if (CompatibilityLevel != null)
         {
             hashCode = hashCode * 59 + CompatibilityLevel.GetHashCode();
         }
         if (Confidence != null)
         {
             hashCode = hashCode * 59 + Confidence.GetHashCode();
         }
         if (ConfidenceDescription != null)
         {
             hashCode = hashCode * 59 + ConfidenceDescription.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(HIO.GetHashCode() * 37 + Confidence.GetHashCode());
     }
 }
Esempio n. 4
0
 /// <summary>Serves as the default hash function. </summary>
 /// <returns>A hash code for the current object.</returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Symbol != null ? Symbol.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Type;
         hashCode = (hashCode * 397) ^ (int)Direction;
         hashCode = (hashCode * 397) ^ Magnitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Confidence.GetHashCode();
         hashCode = (hashCode * 397) ^ Period.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Name?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ StringId?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ Lat.GetHashCode();
         hashCode = (hashCode * 397) ^ Lon.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Type;
         hashCode = (hashCode * 397) ^ Confidence.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 6
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + ((AlertMessage == null) ? 0 : AlertMessage.GetHashCode());
         hash = hash * 23 + (Risk.GetHashCode());
         hash = hash * 23 + (Confidence.GetHashCode());
         hash = hash * 23 + ((Url == null) ? 0 : Url.GetHashCode());
         hash = hash * 23 + ((Other == null) ? 0 : Other.GetHashCode());
         hash = hash * 23 + ((Parameter == null) ? 0 : Parameter.GetHashCode());
         hash = hash * 23 + ((Attack == null) ? 0 : Attack.GetHashCode());
         hash = hash * 23 + ((Evidence == null) ? 0 : Evidence.GetHashCode());
         hash = hash * 23 + ((Description == null) ? 0 : Description.GetHashCode());
         hash = hash * 23 + ((Reference == null) ? 0 : Reference.GetHashCode());
         hash = hash * 23 + ((Solution == null) ? 0 : Solution.GetHashCode());
         hash = hash * 23 + CWEId.GetHashCode();
         hash = hash * 23 + WASCId.GetHashCode();
         return(hash);
     }
 }