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); }
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: { Title = input.ReadString(); break; } case 18: { Type = input.ReadString(); break; } case 26: { OriginalUrl = input.ReadString(); break; } case 34: { if (!HasThumbnail) { Thumbnail = new global::Bgs.Protocol.EmbedImage(); } input.ReadMessage(Thumbnail); break; } case 42: { if (!HasProvider) { Provider = new global::Bgs.Protocol.Provider(); } input.ReadMessage(Provider); break; } case 50: { Description = input.ReadString(); break; } case 58: { if (!HasFavicon) { Favicon = new global::Bgs.Protocol.Favicon(); } input.ReadMessage(Favicon); break; } case 66: { if (!HasHtml) { Html = new global::Bgs.Protocol.EmbedHTML(); } input.ReadMessage(Html); break; } } } }
public void ClearFavicon() { favicon_ = null; }