コード例 #1
0
 public void MergeFrom(FolioState other)
 {
     if (other == null)
     {
         return;
     }
     chargeCredits_.Add(other.chargeCredits_);
     cardSales_.Add(other.cardSales_);
     payments_.Add(other.payments_);
     refunds_.Add(other.refunds_);
     if (other.grossPayments_ != null)
     {
         if (grossPayments_ == null)
         {
             grossPayments_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         GrossPayments.MergeFrom(other.GrossPayments);
     }
     if (other.grossRefunds_ != null)
     {
         if (grossRefunds_ == null)
         {
             grossRefunds_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         GrossRefunds.MergeFrom(other.GrossRefunds);
     }
     if (other.availablePaymentAuthorizationBalance_ != null)
     {
         if (availablePaymentAuthorizationBalance_ == null)
         {
             availablePaymentAuthorizationBalance_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         AvailablePaymentAuthorizationBalance.MergeFrom(other.AvailablePaymentAuthorizationBalance);
     }
     if (other.availableGuaranteeAuthorizationBalance_ != null)
     {
         if (availableGuaranteeAuthorizationBalance_ == null)
         {
             availableGuaranteeAuthorizationBalance_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         AvailableGuaranteeAuthorizationBalance.MergeFrom(other.AvailableGuaranteeAuthorizationBalance);
     }
     if (other.masterFolio_ != null)
     {
         if (masterFolio_ == null)
         {
             masterFolio_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator();
         }
         MasterFolio.MergeFrom(other.MasterFolio);
     }
     clientFolios_.Add(other.clientFolios_);
     if (other.MasterAccruesLodging != false)
     {
         MasterAccruesLodging = other.MasterAccruesLodging;
     }
     if (other.MasterAccruesIncidentals != false)
     {
         MasterAccruesIncidentals = other.MasterAccruesIncidentals;
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            hash ^= chargeCredits_.GetHashCode();
            hash ^= cardSales_.GetHashCode();
            hash ^= payments_.GetHashCode();
            hash ^= refunds_.GetHashCode();
            if (grossPayments_ != null)
            {
                hash ^= GrossPayments.GetHashCode();
            }
            if (grossRefunds_ != null)
            {
                hash ^= GrossRefunds.GetHashCode();
            }
            if (availablePaymentAuthorizationBalance_ != null)
            {
                hash ^= AvailablePaymentAuthorizationBalance.GetHashCode();
            }
            if (availableGuaranteeAuthorizationBalance_ != null)
            {
                hash ^= AvailableGuaranteeAuthorizationBalance.GetHashCode();
            }
            if (masterFolio_ != null)
            {
                hash ^= MasterFolio.GetHashCode();
            }
            hash ^= clientFolios_.GetHashCode();
            if (MasterAccruesLodging != false)
            {
                hash ^= MasterAccruesLodging.GetHashCode();
            }
            if (MasterAccruesIncidentals != false)
            {
                hash ^= MasterAccruesIncidentals.GetHashCode();
            }
            return(hash);
        }