Ejemplo n.º 1
0
 public void MergeFrom(Carrier other)
 {
     if (other == null)
     {
         return;
     }
     if (other.IataCarrierCode.Length != 0)
     {
         IataCarrierCode = other.IataCarrierCode;
     }
     if (other.IcaoCarrierCode.Length != 0)
     {
         IcaoCarrierCode = other.IcaoCarrierCode;
     }
     if (other.IataAccountingCode != 0)
     {
         IataAccountingCode = other.IataAccountingCode;
     }
     if (other.AirlineName.Length != 0)
     {
         AirlineName = other.AirlineName;
     }
     if (other.localizedAirlineName_ != null)
     {
         if (localizedAirlineName_ == null)
         {
             LocalizedAirlineName = new global::PKIo.LocalizedString();
         }
         LocalizedAirlineName.MergeFrom(other.LocalizedAirlineName);
     }
     if (other.PassTypeIdentifier.Length != 0)
     {
         PassTypeIdentifier = other.PassTypeIdentifier;
     }
     if (other.PrivateKeyId.Length != 0)
     {
         PrivateKeyId = other.PrivateKeyId;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (IataCarrierCode.Length != 0)
            {
                hash ^= IataCarrierCode.GetHashCode();
            }
            if (IcaoCarrierCode.Length != 0)
            {
                hash ^= IcaoCarrierCode.GetHashCode();
            }
            if (IataAccountingCode != 0)
            {
                hash ^= IataAccountingCode.GetHashCode();
            }
            if (AirlineName.Length != 0)
            {
                hash ^= AirlineName.GetHashCode();
            }
            if (localizedAirlineName_ != null)
            {
                hash ^= LocalizedAirlineName.GetHashCode();
            }
            if (PassTypeIdentifier.Length != 0)
            {
                hash ^= PassTypeIdentifier.GetHashCode();
            }
            if (PrivateKeyId.Length != 0)
            {
                hash ^= PrivateKeyId.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }