Ejemplo 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 (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (InventoryVariantName != null)
         {
             hashCode = hashCode * 59 + InventoryVariantName.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (ReportDate != null)
         {
             hashCode = hashCode * 59 + ReportDate.GetHashCode();
         }
         if (Creator != null)
         {
             hashCode = hashCode * 59 + Creator.GetHashCode();
         }
         if (Assignees != null)
         {
             hashCode = hashCode * 59 + Assignees.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (HasOnlyUntaggedAssets != null)
         {
             hashCode = hashCode * 59 + HasOnlyUntaggedAssets.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 2
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 + ReportDate.GetHashCode();
                hash = hash * 59 + Title.GetHashCode();
                hash = hash * 59 + DistrictId.GetHashCode();
                hash = hash * 59 + MinistryDistrictId.GetHashCode();
                hash = hash * 59 + DistrictName.GetHashCode();
                hash = hash * 59 + DistrictAddress.GetHashCode();
                hash = hash * 59 + DistrictContact.GetHashCode();
                hash = hash * 59 + Owners.GetHashCode();

                return(hash);
            }
        }
Ejemplo n.º 3
0
 public int GetHashCode(Report obj)
 {
     return(ReportId * (ReportDate.GetHashCode()));
 }