Beispiel #1
0
 public void MergeFrom(EmbedInfo other)
 {
     if (other == null)
     {
         return;
     }
     if (other.HasTitle)
     {
         Title = other.Title;
     }
     if (other.HasType)
     {
         Type = other.Type;
     }
     if (other.HasOriginalUrl)
     {
         OriginalUrl = other.OriginalUrl;
     }
     if (other.HasThumbnail)
     {
         if (!HasThumbnail)
         {
             Thumbnail = new global::Bgs.Protocol.EmbedImage();
         }
         Thumbnail.MergeFrom(other.Thumbnail);
     }
     if (other.HasProvider)
     {
         if (!HasProvider)
         {
             Provider = new global::Bgs.Protocol.Provider();
         }
         Provider.MergeFrom(other.Provider);
     }
     if (other.HasDescription)
     {
         Description = other.Description;
     }
     if (other.HasFavicon)
     {
         if (!HasFavicon)
         {
             Favicon = new global::Bgs.Protocol.Favicon();
         }
         Favicon.MergeFrom(other.Favicon);
     }
     if (other.HasHtml)
     {
         if (!HasHtml)
         {
             Html = new global::Bgs.Protocol.EmbedHTML();
         }
         Html.MergeFrom(other.Html);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }