public void MergeFrom(DataPoint other) { if (other == null) { return; } if (other.Ns.Length != 0) { Ns = other.Ns; } if (other.Name.Length != 0) { Name = other.Name; } if (other.Kind != 0) { Kind = other.Kind; } if (other.Value != 0D) { Value = other.Value; } if (other.count_ != null) { if (count_ == null) { count_ = new global::Google.Protobuf.WellKnownTypes.Int32Value(); } Count.MergeFrom(other.Count); } if (other.min_ != null) { if (min_ == null) { min_ = new global::Google.Protobuf.WellKnownTypes.DoubleValue(); } Min.MergeFrom(other.Min); } if (other.max_ != null) { if (max_ == null) { max_ = new global::Google.Protobuf.WellKnownTypes.DoubleValue(); } Max.MergeFrom(other.Max); } if (other.stdDev_ != null) { if (stdDev_ == null) { stdDev_ = new global::Google.Protobuf.WellKnownTypes.DoubleValue(); } StdDev.MergeFrom(other.StdDev); } _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: { Ns = input.ReadString(); break; } case 18: { Name = input.ReadString(); break; } case 24: { kind_ = (global::Microsoft.LocalForwarder.Library.Inputs.Contracts.DataPointType)input.ReadEnum(); break; } case 33: { Value = input.ReadDouble(); break; } case 42: { if (count_ == null) { count_ = new global::Google.Protobuf.WellKnownTypes.Int32Value(); } input.ReadMessage(count_); break; } case 50: { if (min_ == null) { min_ = new global::Google.Protobuf.WellKnownTypes.DoubleValue(); } input.ReadMessage(min_); break; } case 58: { if (max_ == null) { max_ = new global::Google.Protobuf.WellKnownTypes.DoubleValue(); } input.ReadMessage(max_); break; } case 66: { if (stdDev_ == null) { stdDev_ = new global::Google.Protobuf.WellKnownTypes.DoubleValue(); } input.ReadMessage(stdDev_); break; } } } }