public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (SuggestionsId?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Customer_Name?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Sender_Name?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Sender_Address?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Existing_Sender_City?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Normalised_Sender_City?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Sender_Country?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Sender_Zipcode?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Receiver_Name?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Receiver_Address?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Existing_Receiver_City?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Normalised_Receiver_City?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Existing_Pallet_Name?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Normalised_Pallet_Name?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Receiver_Zipcode?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Receiver_Country?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Carrier?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Order_Number?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Shipment_Date?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Weight?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Volume?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Cost?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Currency?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Number_Of_Pallets?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Suggestion_Date?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Approved.GetHashCode());
            hashCode = hashCode * -1521134295 + (ApprovedBy?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ApprovedDate?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Owner?.GetHashCode() ?? 0);
            return(hashCode);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns true if Agreement instances are equal
        /// </summary>
        /// <param name="other">Instance of Agreement to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Agreement other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     AgreementId == other.AgreementId ||
                     AgreementId != null &&
                     AgreementId.Equals(other.AgreementId)
                     ) &&
                 (
                     Demand == other.Demand ||
                     Demand != null &&
                     Demand.Equals(other.Demand)
                 ) &&
                 (
                     Offer == other.Offer ||
                     Offer != null &&
                     Offer.Equals(other.Offer)
                 ) &&
                 (
                     ValidTo == other.ValidTo ||
                     ValidTo != null &&
                     ValidTo.Equals(other.ValidTo)
                 ) &&
                 (
                     ApprovedDate == other.ApprovedDate ||
                     ApprovedDate != null &&
                     ApprovedDate.Equals(other.ApprovedDate)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ) &&
                 (
                     ProposedSignature == other.ProposedSignature ||
                     ProposedSignature != null &&
                     ProposedSignature.Equals(other.ProposedSignature)
                 ) &&
                 (
                     ApprovedSignature == other.ApprovedSignature ||
                     ApprovedSignature != null &&
                     ApprovedSignature.Equals(other.ApprovedSignature)
                 ) &&
                 (
                     CommittedSignature == other.CommittedSignature ||
                     CommittedSignature != null &&
                     CommittedSignature.Equals(other.CommittedSignature)
                 ));
        }
Exemplo n.º 3
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 (AgreementId != null)
         {
             hashCode = hashCode * 59 + AgreementId.GetHashCode();
         }
         if (Demand != null)
         {
             hashCode = hashCode * 59 + Demand.GetHashCode();
         }
         if (Offer != null)
         {
             hashCode = hashCode * 59 + Offer.GetHashCode();
         }
         if (ValidTo != null)
         {
             hashCode = hashCode * 59 + ValidTo.GetHashCode();
         }
         if (ApprovedDate != null)
         {
             hashCode = hashCode * 59 + ApprovedDate.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (ProposedSignature != null)
         {
             hashCode = hashCode * 59 + ProposedSignature.GetHashCode();
         }
         if (ApprovedSignature != null)
         {
             hashCode = hashCode * 59 + ApprovedSignature.GetHashCode();
         }
         if (CommittedSignature != null)
         {
             hashCode = hashCode * 59 + CommittedSignature.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemplo n.º 4
0
 public void WriteToStream(MStreamWriter sw)
 {
     sw.Write(SetId);
     sw.Write(ChildrenBeatmaps.Count);
     foreach (var bm in ChildrenBeatmaps)
     {
         sw.Write(bm);
     }
     sw.Write((sbyte)RankedStatus);
     sw.Write(ApprovedDate?.ToString(), true);
     sw.Write(LastUpdate?.ToString(), true);
     sw.Write(LastChecked?.ToString(), true);
     sw.Write(Artist, true);
     sw.Write(Title, true);
     sw.Write(Creator, true);
     sw.Write(Source, true);
     sw.Write(Tags, true);
     sw.Write(HasVideo);
     sw.Write((sbyte)Genre);
     sw.Write((sbyte)Language);
     sw.Write(Favourites);
     sw.Write(Disabled);
 }