Ejemplo n.º 1
0
 public void MergeFrom(Port other)
 {
     if (other == null)
     {
         return;
     }
     if (other.IataAirportCode.Length != 0)
     {
         IataAirportCode = other.IataAirportCode;
     }
     if (other.IcaoAirportCode.Length != 0)
     {
         IcaoAirportCode = other.IcaoAirportCode;
     }
     if (other.CityName.Length != 0)
     {
         CityName = other.CityName;
     }
     if (other.localizedCityName_ != null)
     {
         if (localizedCityName_ == null)
         {
             LocalizedCityName = new global::PKIo.LocalizedString();
         }
         LocalizedCityName.MergeFrom(other.LocalizedCityName);
     }
     if (other.AirportName.Length != 0)
     {
         AirportName = other.AirportName;
     }
     if (other.localizedAirportName_ != null)
     {
         if (localizedAirportName_ == null)
         {
             LocalizedAirportName = new global::PKIo.LocalizedString();
         }
         LocalizedAirportName.MergeFrom(other.LocalizedAirportName);
     }
     if (other.CountryCode.Length != 0)
     {
         CountryCode = other.CountryCode;
     }
     if (other.Timezone.Length != 0)
     {
         Timezone = other.Timezone;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (IataAirportCode.Length != 0)
            {
                hash ^= IataAirportCode.GetHashCode();
            }
            if (IcaoAirportCode.Length != 0)
            {
                hash ^= IcaoAirportCode.GetHashCode();
            }
            if (CityName.Length != 0)
            {
                hash ^= CityName.GetHashCode();
            }
            if (localizedCityName_ != null)
            {
                hash ^= LocalizedCityName.GetHashCode();
            }
            if (AirportName.Length != 0)
            {
                hash ^= AirportName.GetHashCode();
            }
            if (localizedAirportName_ != null)
            {
                hash ^= LocalizedAirportName.GetHashCode();
            }
            if (CountryCode.Length != 0)
            {
                hash ^= CountryCode.GetHashCode();
            }
            if (Timezone.Length != 0)
            {
                hash ^= Timezone.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }