コード例 #1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    Country = input.ReadString();
                    break;
                }

                case 18: {
                    City = input.ReadString();
                    break;
                }

                case 26: {
                    if (checkin_ == null)
                    {
                        Checkin = new global::Stays.Date();
                    }
                    input.ReadMessage(Checkin);
                    break;
                }

                case 34: {
                    if (checkout_ == null)
                    {
                        Checkout = new global::Stays.Date();
                    }
                    input.ReadMessage(Checkout);
                    break;
                }

                case 40: {
                    Rooms = input.ReadInt32();
                    break;
                }
                }
            }
        }
コード例 #2
0
 public void MergeFrom(SearchStaysRequest other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Country.Length != 0)
     {
         Country = other.Country;
     }
     if (other.City.Length != 0)
     {
         City = other.City;
     }
     if (other.checkin_ != null)
     {
         if (checkin_ == null)
         {
             Checkin = new global::Stays.Date();
         }
         Checkin.MergeFrom(other.Checkin);
     }
     if (other.checkout_ != null)
     {
         if (checkout_ == null)
         {
             Checkout = new global::Stays.Date();
         }
         Checkout.MergeFrom(other.Checkout);
     }
     if (other.Rooms != 0)
     {
         Rooms = other.Rooms;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }