Beispiel #1
0
 public void MergeFrom(Release other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.info_ != null)
     {
         if (info_ == null)
         {
             info_ = new global::Hapi.Release.Info();
         }
         Info.MergeFrom(other.Info);
     }
     if (other.chart_ != null)
     {
         if (chart_ == null)
         {
             chart_ = new global::Hapi.Chart.Chart();
         }
         Chart.MergeFrom(other.Chart);
     }
     if (other.config_ != null)
     {
         if (config_ == null)
         {
             config_ = new global::Hapi.Chart.Config();
         }
         Config.MergeFrom(other.Config);
     }
     if (other.Manifest.Length != 0)
     {
         Manifest = other.Manifest;
     }
     hooks_.Add(other.hooks_);
     if (other.Version != 0)
     {
         Version = other.Version;
     }
     if (other.Namespace.Length != 0)
     {
         Namespace = other.Namespace;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Beispiel #2
0
        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: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    if (info_ == null)
                    {
                        info_ = new global::Hapi.Release.Info();
                    }
                    input.ReadMessage(info_);
                    break;
                }

                case 26: {
                    if (chart_ == null)
                    {
                        chart_ = new global::Hapi.Chart.Chart();
                    }
                    input.ReadMessage(chart_);
                    break;
                }

                case 34: {
                    if (config_ == null)
                    {
                        config_ = new global::Hapi.Chart.Config();
                    }
                    input.ReadMessage(config_);
                    break;
                }

                case 42: {
                    Manifest = input.ReadString();
                    break;
                }

                case 50: {
                    hooks_.AddEntriesFrom(input, _repeated_hooks_codec);
                    break;
                }

                case 56: {
                    Version = input.ReadInt32();
                    break;
                }

                case 66: {
                    Namespace = input.ReadString();
                    break;
                }
                }
            }
        }