Beispiel #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 (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (Checked != null)
         {
             hashCode = hashCode * 59 + Checked.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #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 (InventoryVariantName != null)
         {
             hashCode = hashCode * 59 + InventoryVariantName.GetHashCode();
         }
         if (TagId != null)
         {
             hashCode = hashCode * 59 + TagId.GetHashCode();
         }
         if (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         return(hashCode);
     }
 }
        public override int GetHashCode()
        {
            int hashCode = 13;

            hashCode = (hashCode * 7) + CompanyID.GetHashCode();
            hashCode = (hashCode * 7) + CompanyCode.GetHashCode();
            return(hashCode);
        }
        /// <summary>
        /// Получение хэша для группировки допуслуг.
        /// Группировка производится относительноп пассажира и данных допуслуги
        /// </summary>
        /// <returns>Хэш группировки</returns>
        public int ComputeGroupingHashCode()
        {
            // Если в клиентском коде не была указана ссылка на пассажира, заваливаем вычесление
            // т.к. без указания ссылки на пассажира хэш не будет валидным
            if (TravellerRef.Count == 0)
            {
                throw new ArgumentException("TravellerRef");
            }

            if (Name == null)
            {
                throw new ArgumentException("Name");
            }

            if (RFIC == null)
            {
                throw new ArgumentException("RFIC");
            }

            if (RFISC == null)
            {
                throw new ArgumentException("RFISC");
            }

            if (CompanyCode == null)
            {
                throw new ArgumentException("CompanyCode");
            }

            unchecked
            {
                var hash =
                    TravellerRef[0] +
                    Name.GetHashCode() +
                    RFIC.GetHashCode() +
                    RFISC.GetHashCode() +
                    IsFree.GetHashCode() +
                    Status.GetHashCode() +
                    CompanyCode.GetHashCode();

                if (SSRCode != null)
                {
                    hash += SSRCode.GetHashCode();
                }

                if (SSRText != null)
                {
                    hash += SSRText.GetHashCode();
                }

                if (TypeCode != null)
                {
                    hash += TypeCode.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 (SearchString != null)
         {
             hashCode = hashCode * 59 + SearchString.GetHashCode();
         }
         if (SortingColumn != null)
         {
             hashCode = hashCode * 59 + SortingColumn.GetHashCode();
         }
         if (TagId != null)
         {
             hashCode = hashCode * 59 + TagId.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (Latitude != null)
         {
             hashCode = hashCode * 59 + Latitude.GetHashCode();
         }
         if (Longitude != null)
         {
             hashCode = hashCode * 59 + Longitude.GetHashCode();
         }
         if (AssetClass != null)
         {
             hashCode = hashCode * 59 + AssetClass.GetHashCode();
         }
         if (LastModified != null)
         {
             hashCode = hashCode * 59 + LastModified.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (Creator != null)
         {
             hashCode = hashCode * 59 + Creator.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         if (InventoryNumber != null)
         {
             hashCode = hashCode * 59 + InventoryNumber.GetHashCode();
         }
         if (SerialNumber != null)
         {
             hashCode = hashCode * 59 + SerialNumber.GetHashCode();
         }
         if (Location != null)
         {
             hashCode = hashCode * 59 + Location.GetHashCode();
         }
         if (Room != null)
         {
             hashCode = hashCode * 59 + Room.GetHashCode();
         }
         if (CostCenter != null)
         {
             hashCode = hashCode * 59 + CostCenter.GetHashCode();
         }
         if (CapitalisationDate != null)
         {
             hashCode = hashCode * 59 + CapitalisationDate.GetHashCode();
         }
         if (LastInventoryDate != null)
         {
             hashCode = hashCode * 59 + LastInventoryDate.GetHashCode();
         }
         if (AcquisitionValue != null)
         {
             hashCode = hashCode * 59 + AcquisitionValue.GetHashCode();
         }
         if (AssetSuperNumber != null)
         {
             hashCode = hashCode * 59 + AssetSuperNumber.GetHashCode();
         }
         if (Vendor != null)
         {
             hashCode = hashCode * 59 + Vendor.GetHashCode();
         }
         if (TypeName != null)
         {
             hashCode = hashCode * 59 + TypeName.GetHashCode();
         }
         if (Plant != null)
         {
             hashCode = hashCode * 59 + Plant.GetHashCode();
         }
         if (Quantity != null)
         {
             hashCode = hashCode * 59 + Quantity.GetHashCode();
         }
         if (Unit != null)
         {
             hashCode = hashCode * 59 + Unit.GetHashCode();
         }
         if (Untaggable != null)
         {
             hashCode = hashCode * 59 + Untaggable.GetHashCode();
         }
         if (Untagged != null)
         {
             hashCode = hashCode * 59 + Untagged.GetHashCode();
         }
         if (Page != null)
         {
             hashCode = hashCode * 59 + Page.GetHashCode();
         }
         if (PageSize != null)
         {
             hashCode = hashCode * 59 + PageSize.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #6
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 (AssetNumber != null)
         {
             hashCode = hashCode * 59 + AssetNumber.GetHashCode();
         }
         if (SubNumber != null)
         {
             hashCode = hashCode * 59 + SubNumber.GetHashCode();
         }
         if (CompanyCode != null)
         {
             hashCode = hashCode * 59 + CompanyCode.GetHashCode();
         }
         if (TagId != null)
         {
             hashCode = hashCode * 59 + TagId.GetHashCode();
         }
         if (SecondTagId != null)
         {
             hashCode = hashCode * 59 + SecondTagId.GetHashCode();
         }
         if (IsUntaggable != null)
         {
             hashCode = hashCode * 59 + IsUntaggable.GetHashCode();
         }
         if (LastModified != null)
         {
             hashCode = hashCode * 59 + LastModified.GetHashCode();
         }
         if (Created != null)
         {
             hashCode = hashCode * 59 + Created.GetHashCode();
         }
         if (Creator != null)
         {
             hashCode = hashCode * 59 + Creator.GetHashCode();
         }
         if (InventoryNumber != null)
         {
             hashCode = hashCode * 59 + InventoryNumber.GetHashCode();
         }
         if (SerialNumber != null)
         {
             hashCode = hashCode * 59 + SerialNumber.GetHashCode();
         }
         if (Location != null)
         {
             hashCode = hashCode * 59 + Location.GetHashCode();
         }
         if (Room != null)
         {
             hashCode = hashCode * 59 + Room.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (CostCenter != null)
         {
             hashCode = hashCode * 59 + CostCenter.GetHashCode();
         }
         if (CapitalisationDate != null)
         {
             hashCode = hashCode * 59 + CapitalisationDate.GetHashCode();
         }
         if (LastInventoryDate != null)
         {
             hashCode = hashCode * 59 + LastInventoryDate.GetHashCode();
         }
         if (AcquisitionValue != null)
         {
             hashCode = hashCode * 59 + AcquisitionValue.GetHashCode();
         }
         if (AssetSuperNumber != null)
         {
             hashCode = hashCode * 59 + AssetSuperNumber.GetHashCode();
         }
         if (Vendor != null)
         {
             hashCode = hashCode * 59 + Vendor.GetHashCode();
         }
         if (TypeName != null)
         {
             hashCode = hashCode * 59 + TypeName.GetHashCode();
         }
         if (Plant != null)
         {
             hashCode = hashCode * 59 + Plant.GetHashCode();
         }
         if (AssetClass != null)
         {
             hashCode = hashCode * 59 + AssetClass.GetHashCode();
         }
         if (Quantity != null)
         {
             hashCode = hashCode * 59 + Quantity.GetHashCode();
         }
         if (Unit != null)
         {
             hashCode = hashCode * 59 + Unit.GetHashCode();
         }
         if (DeactivatedOn != null)
         {
             hashCode = hashCode * 59 + DeactivatedOn.GetHashCode();
         }
         if (IsDeactivated != null)
         {
             hashCode = hashCode * 59 + IsDeactivated.GetHashCode();
         }
         if (CompanyCodeCurrency != null)
         {
             hashCode = hashCode * 59 + CompanyCodeCurrency.GetHashCode();
         }
         if (Comment != null)
         {
             hashCode = hashCode * 59 + Comment.GetHashCode();
         }
         if (ShareTags != null)
         {
             hashCode = hashCode * 59 + ShareTags.GetHashCode();
         }
         return(hashCode);
     }
 }