コード例 #1
0
 public void MergeFrom(CancellationRequest other)
 {
     if (other == null)
     {
         return;
     }
     if (other.reservation_ != null)
     {
         if (reservation_ == null)
         {
             reservation_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator();
         }
         Reservation.MergeFrom(other.Reservation);
     }
     if (other.ApplyPenalty != false)
     {
         ApplyPenalty = other.ApplyPenalty;
     }
     if (other.CancellationReason.Length != 0)
     {
         CancellationReason = other.CancellationReason;
     }
     if (other.penaltyEstimate_ != null)
     {
         if (penaltyEstimate_ == null)
         {
             penaltyEstimate_ = new global::HOLMS.Types.Booking.CancellationPenaltyEstimate();
         }
         PenaltyEstimate.MergeFrom(other.PenaltyEstimate);
     }
     if (other.RequestingParty.Length != 0)
     {
         RequestingParty = other.RequestingParty;
     }
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (reservation_ != null)
            {
                hash ^= Reservation.GetHashCode();
            }
            if (ApplyPenalty != false)
            {
                hash ^= ApplyPenalty.GetHashCode();
            }
            if (CancellationReason.Length != 0)
            {
                hash ^= CancellationReason.GetHashCode();
            }
            if (penaltyEstimate_ != null)
            {
                hash ^= PenaltyEstimate.GetHashCode();
            }
            if (RequestingParty.Length != 0)
            {
                hash ^= RequestingParty.GetHashCode();
            }
            return(hash);
        }