コード例 #1
0
 public void MergeFrom(ExportMetricsServiceRequest other)
 {
     if (other == null)
     {
         return;
     }
     if (other.node_ != null)
     {
         if (node_ == null)
         {
             Node = new global::Opencensus.Proto.Agent.Common.V1.Node();
         }
         Node.MergeFrom(other.Node);
     }
     metrics_.Add(other.metrics_);
     if (other.resource_ != null)
     {
         if (resource_ == null)
         {
             Resource = new global::Opencensus.Proto.Resource.V1.Resource();
         }
         Resource.MergeFrom(other.Resource);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
コード例 #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: {
                    if (node_ == null)
                    {
                        Node = new global::Opencensus.Proto.Agent.Common.V1.Node();
                    }
                    input.ReadMessage(Node);
                    break;
                }

                case 18: {
                    metrics_.AddEntriesFrom(input, _repeated_metrics_codec);
                    break;
                }

                case 26: {
                    if (resource_ == null)
                    {
                        Resource = new global::Opencensus.Proto.Resource.V1.Resource();
                    }
                    input.ReadMessage(Resource);
                    break;
                }
                }
            }
        }