예제 #1
0
 public void MergeFrom(CommonAddOnManifest other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.LogoUrl.Length != 0)
     {
         LogoUrl = other.LogoUrl;
     }
     if (other.layoutProperties_ != null)
     {
         if (layoutProperties_ == null)
         {
             LayoutProperties = new global::Google.Apps.Script.Type.LayoutProperties();
         }
         LayoutProperties.MergeFrom(other.LayoutProperties);
     }
     if (other.addOnWidgetSet_ != null)
     {
         if (addOnWidgetSet_ == null)
         {
             AddOnWidgetSet = new global::Google.Apps.Script.Type.AddOnWidgetSet();
         }
         AddOnWidgetSet.MergeFrom(other.AddOnWidgetSet);
     }
     if (other.UseLocaleFromApp != false)
     {
         UseLocaleFromApp = other.UseLocaleFromApp;
     }
     if (other.homepageTrigger_ != null)
     {
         if (homepageTrigger_ == null)
         {
             HomepageTrigger = new global::Google.Apps.Script.Type.HomepageExtensionPoint();
         }
         HomepageTrigger.MergeFrom(other.HomepageTrigger);
     }
     universalActions_.Add(other.universalActions_);
     if (other.openLinkUrlPrefixes_ != null)
     {
         if (openLinkUrlPrefixes_ == null)
         {
             OpenLinkUrlPrefixes = new global::Google.Protobuf.WellKnownTypes.ListValue();
         }
         OpenLinkUrlPrefixes.MergeFrom(other.OpenLinkUrlPrefixes);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #2
0
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
                    break;

                case 10: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    LogoUrl = input.ReadString();
                    break;
                }

                case 26: {
                    if (layoutProperties_ == null)
                    {
                        LayoutProperties = new global::Google.Apps.Script.Type.LayoutProperties();
                    }
                    input.ReadMessage(LayoutProperties);
                    break;
                }

                case 34: {
                    if (addOnWidgetSet_ == null)
                    {
                        AddOnWidgetSet = new global::Google.Apps.Script.Type.AddOnWidgetSet();
                    }
                    input.ReadMessage(AddOnWidgetSet);
                    break;
                }

                case 40: {
                    UseLocaleFromApp = input.ReadBool();
                    break;
                }

                case 50: {
                    if (homepageTrigger_ == null)
                    {
                        HomepageTrigger = new global::Google.Apps.Script.Type.HomepageExtensionPoint();
                    }
                    input.ReadMessage(HomepageTrigger);
                    break;
                }

                case 58: {
                    universalActions_.AddEntriesFrom(ref input, _repeated_universalActions_codec);
                    break;
                }

                case 66: {
                    if (openLinkUrlPrefixes_ == null)
                    {
                        OpenLinkUrlPrefixes = new global::Google.Protobuf.WellKnownTypes.ListValue();
                    }
                    input.ReadMessage(OpenLinkUrlPrefixes);
                    break;
                }
                }
            }
        }
예제 #3
0
        public void MergeFrom(pb::CodedInputStream input)
        {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
            input.ReadRawMessage(this);
    #else
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    LogoUrl = input.ReadString();
                    break;
                }

                case 26: {
                    if (layoutProperties_ == null)
                    {
                        LayoutProperties = new global::Google.Apps.Script.Type.LayoutProperties();
                    }
                    input.ReadMessage(LayoutProperties);
                    break;
                }

                case 34: {
                    if (addOnWidgetSet_ == null)
                    {
                        AddOnWidgetSet = new global::Google.Apps.Script.Type.AddOnWidgetSet();
                    }
                    input.ReadMessage(AddOnWidgetSet);
                    break;
                }

                case 40: {
                    UseLocaleFromApp = input.ReadBool();
                    break;
                }

                case 50: {
                    if (homepageTrigger_ == null)
                    {
                        HomepageTrigger = new global::Google.Apps.Script.Type.HomepageExtensionPoint();
                    }
                    input.ReadMessage(HomepageTrigger);
                    break;
                }

                case 58: {
                    universalActions_.AddEntriesFrom(input, _repeated_universalActions_codec);
                    break;
                }

                case 66: {
                    if (openLinkUrlPrefixes_ == null)
                    {
                        OpenLinkUrlPrefixes = new global::Google.Protobuf.WellKnownTypes.ListValue();
                    }
                    input.ReadMessage(OpenLinkUrlPrefixes);
                    break;
                }
                }
            }
    #endif
        }