Example #1
0
 public void MergeFrom(Link other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.Url.Length != 0)
     {
         Url = other.Url;
     }
     if (other.Title.Length != 0)
     {
         Title = other.Title;
     }
     if (other.Type != global::PKIo.LinkType.UriDoNotUse)
     {
         Type = other.Type;
     }
     if (other.localizedLink_ != null)
     {
         if (localizedLink_ == null)
         {
             LocalizedLink = new global::PKIo.LocalizedString();
         }
         LocalizedLink.MergeFrom(other.LocalizedLink);
     }
     if (other.localizedTitle_ != null)
     {
         if (localizedTitle_ == null)
         {
             LocalizedTitle = new global::PKIo.LocalizedString();
         }
         LocalizedTitle.MergeFrom(other.LocalizedTitle);
     }
     usage_.Add(other.usage_);
     if (other.Position != 0)
     {
         Position = other.Position;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Example #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Url.Length != 0)
            {
                hash ^= Url.GetHashCode();
            }
            if (Title.Length != 0)
            {
                hash ^= Title.GetHashCode();
            }
            if (Type != global::PKIo.LinkType.UriDoNotUse)
            {
                hash ^= Type.GetHashCode();
            }
            if (localizedLink_ != null)
            {
                hash ^= LocalizedLink.GetHashCode();
            }
            if (localizedTitle_ != null)
            {
                hash ^= LocalizedTitle.GetHashCode();
            }
            hash ^= usage_.GetHashCode();
            if (Position != 0)
            {
                hash ^= Position.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }