示例#1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    if (summary_ == null)
                    {
                        summary_ = new global::Apollo.Monitor.ComponentStatus();
                    }
                    input.ReadMessage(summary_);
                    break;
                }

                case 18: {
                    if (processStatus_ == null)
                    {
                        processStatus_ = new global::Apollo.Monitor.ComponentStatus();
                    }
                    input.ReadMessage(processStatus_);
                    break;
                }

                case 26: {
                    if (channelStatus_ == null)
                    {
                        channelStatus_ = new global::Apollo.Monitor.ComponentStatus();
                    }
                    input.ReadMessage(channelStatus_);
                    break;
                }

                case 34: {
                    if (resourceStatus_ == null)
                    {
                        resourceStatus_ = new global::Apollo.Monitor.ComponentStatus();
                    }
                    input.ReadMessage(resourceStatus_);
                    break;
                }

                case 42: {
                    if (otherStatus_ == null)
                    {
                        otherStatus_ = new global::Apollo.Monitor.ComponentStatus();
                    }
                    input.ReadMessage(otherStatus_);
                    break;
                }
                }
            }
        }
示例#2
0
 public void MergeFrom(Component other)
 {
     if (other == null)
     {
         return;
     }
     if (other.summary_ != null)
     {
         if (summary_ == null)
         {
             summary_ = new global::Apollo.Monitor.ComponentStatus();
         }
         Summary.MergeFrom(other.Summary);
     }
     if (other.processStatus_ != null)
     {
         if (processStatus_ == null)
         {
             processStatus_ = new global::Apollo.Monitor.ComponentStatus();
         }
         ProcessStatus.MergeFrom(other.ProcessStatus);
     }
     if (other.channelStatus_ != null)
     {
         if (channelStatus_ == null)
         {
             channelStatus_ = new global::Apollo.Monitor.ComponentStatus();
         }
         ChannelStatus.MergeFrom(other.ChannelStatus);
     }
     if (other.resourceStatus_ != null)
     {
         if (resourceStatus_ == null)
         {
             resourceStatus_ = new global::Apollo.Monitor.ComponentStatus();
         }
         ResourceStatus.MergeFrom(other.ResourceStatus);
     }
     if (other.otherStatus_ != null)
     {
         if (otherStatus_ == null)
         {
             otherStatus_ = new global::Apollo.Monitor.ComponentStatus();
         }
         OtherStatus.MergeFrom(other.OtherStatus);
     }
 }