Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Prio != 0)
            {
                hash ^= Prio.GetHashCode();
            }
            if (GroupName.Length != 0)
            {
                hash ^= GroupName.GetHashCode();
            }
            return(hash);
        }
Пример #2
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 (Incidentid != null)
         {
             hashCode = hashCode * 59 + Incidentid.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Position != null)
         {
             hashCode = hashCode * 59 + Position.GetHashCode();
         }
         if (Prio != null)
         {
             hashCode = hashCode * 59 + Prio.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (Probability != null)
         {
             hashCode = hashCode * 59 + Probability.GetHashCode();
         }
         if (Interventionplan != null)
         {
             hashCode = hashCode * 59 + Interventionplan.GetHashCode();
         }
         if (Incidenttime != null)
         {
             hashCode = hashCode * 59 + Incidenttime.GetHashCode();
         }
         if (Wbid != null)
         {
             hashCode = hashCode * 59 + Wbid.GetHashCode();
         }
         if (Telephone != null)
         {
             hashCode = hashCode * 59 + Telephone.GetHashCode();
         }
         if (AdditionalMedia != null)
         {
             hashCode = hashCode * 59 + AdditionalMedia.GetHashCode();
         }
         if (MediaType != null)
         {
             hashCode = hashCode * 59 + MediaType.GetHashCode();
         }
         if (Area != null)
         {
             hashCode = hashCode * 59 + Area.GetHashCode();
         }
         return(hashCode);
     }
 }