コード例 #1
0
 public void MergeFrom(LodgingSnapshotResponseRecord other)
 {
     if (other == null)
     {
         return;
     }
     if (other.roomType_ != null)
     {
         if (roomType_ == null)
         {
             roomType_ = new global::HOLMS.Types.Supply.RoomTypes.RoomTypeIndicator();
         }
         RoomType.MergeFrom(other.RoomType);
     }
     if (other.date_ != null)
     {
         if (date_ == null)
         {
             date_ = new global::HOLMS.Types.Primitive.PbLocalDate();
         }
         Date.MergeFrom(other.Date);
     }
     if (other.offeredPrice_ != null)
     {
         if (offeredPrice_ == null)
         {
             offeredPrice_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         OfferedPrice.MergeFrom(other.OfferedPrice);
     }
     if (other.quantities_ != null)
     {
         if (quantities_ == null)
         {
             quantities_ = new global::HOLMS.Types.Supply.Snapshot.LodgingSnapshotQuantity();
         }
         Quantities.MergeFrom(other.Quantities);
     }
     requiredReservationTags_.Add(other.requiredReservationTags_);
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (roomType_ != null)
            {
                hash ^= RoomType.GetHashCode();
            }
            if (date_ != null)
            {
                hash ^= Date.GetHashCode();
            }
            if (offeredPrice_ != null)
            {
                hash ^= OfferedPrice.GetHashCode();
            }
            if (quantities_ != null)
            {
                hash ^= Quantities.GetHashCode();
            }
            hash ^= requiredReservationTags_.GetHashCode();
            return(hash);
        }