예제 #1
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 + Id.GetHashCode();

                if (DistrictName != null)
                {
                    hash = hash * 59 + DistrictName.GetHashCode();
                }

                if (SerialNumber != null)
                {
                    hash = hash * 59 + SerialNumber.GetHashCode();
                }

                if (DuplicateEquipment != null)
                {
                    hash = hash * 59 + DuplicateEquipment.GetHashCode();
                }

                return(hash);
            }
        }
예제 #2
0
 /// <summary>
 /// GetHashCode
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 17;
         hash = hash * 23 + DistrictName.GetHashCode();
         return(hash);
     }
 }
예제 #3
0
 /// <summary>
 /// GetHashCode
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 17;
         hash = hash * 23 + CityName.GetHashCode();
         hash = hash * 23 + DistrictName.GetHashCode();
         hash = hash * 23 + CountyName.GetHashCode();
         hash = hash * 23 + ProvinceName.GetHashCode();
         hash = hash * 23 + CityDivisionCode.GetHashCode();
         return(hash);
     }
 }
 /// <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 (Address != null)
         {
             hashCode = hashCode * 59 + Address.GetHashCode();
         }
         if (AdditionalInfo != null)
         {
             hashCode = hashCode * 59 + AdditionalInfo.GetHashCode();
         }
         if (DistrictName != null)
         {
             hashCode = hashCode * 59 + DistrictName.GetHashCode();
         }
         if (TownName != null)
         {
             hashCode = hashCode * 59 + TownName.GetHashCode();
         }
         if (IbgeCode != null)
         {
             hashCode = hashCode * 59 + IbgeCode.GetHashCode();
         }
         if (CountrySubDivision != null)
         {
             hashCode = hashCode * 59 + CountrySubDivision.GetHashCode();
         }
         if (PostCode != null)
         {
             hashCode = hashCode * 59 + PostCode.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (CountryCode != null)
         {
             hashCode = hashCode * 59 + CountryCode.GetHashCode();
         }
         if (GeographicCoordinates != null)
         {
             hashCode = hashCode * 59 + GeographicCoordinates.GetHashCode();
         }
         return(hashCode);
     }
 }
예제 #5
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);
            }
        }