예제 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (guestId_ != null)
            {
                hash ^= GuestId.GetHashCode();
            }
            hash ^= cancellations_.GetHashCode();
            if (lastCheckin_ != null)
            {
                hash ^= LastCheckin.GetHashCode();
            }
            if (TotalNightsStayed != 0)
            {
                hash ^= TotalNightsStayed.GetHashCode();
            }
            if (totalInvoiced_ != null)
            {
                hash ^= TotalInvoiced.GetHashCode();
            }
            return(hash);
        }
예제 #2
0
 public void MergeFrom(GuestHistorySummary other)
 {
     if (other == null)
     {
         return;
     }
     if (other.guestId_ != null)
     {
         if (guestId_ == null)
         {
             guestId_ = new global::HOLMS.Types.CRM.Guests.GuestIndicator();
         }
         GuestId.MergeFrom(other.GuestId);
     }
     cancellations_.Add(other.cancellations_);
     if (other.lastCheckin_ != null)
     {
         if (lastCheckin_ == null)
         {
             lastCheckin_ = new global::HOLMS.Types.CRM.Guests.GuestCheckedIn();
         }
         LastCheckin.MergeFrom(other.LastCheckin);
     }
     if (other.TotalNightsStayed != 0)
     {
         TotalNightsStayed = other.TotalNightsStayed;
     }
     if (other.totalInvoiced_ != null)
     {
         if (totalInvoiced_ == null)
         {
             totalInvoiced_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         TotalInvoiced.MergeFrom(other.TotalInvoiced);
     }
 }