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 (unit_ == null) { unit_ = new global::PhysicalUnit(); } input.ReadMessage(unit_); break; } case 25: { Magnitude = input.ReadDouble(); break; } } } }
public void MergeFrom(PhysicalQuantity other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.unit_ != null) { if (unit_ == null) { unit_ = new global::PhysicalUnit(); } Unit.MergeFrom(other.Unit); } if (other.Magnitude != 0D) { Magnitude = other.Magnitude; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }