public void MergeFrom(IReadStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { case 10: { if (point3map == null) { point3map = new Dictionary <int, Point3>(); } var entry = new Point3mapEntry(); input.ReadMessage(entry); point3map[entry.key] = entry.value; } break; default: input.SkipLastField(tag); break; } } }
public void WriteTo(IWriteStream output) { if (point3map != null && point3map.Count != 0) { var entry = new Point3mapEntry(); foreach (var itor in point3map) { entry.key = itor.Key; entry.value = itor.Value; output.WriteRawTag(10); output.WriteMessage(entry); } } }
public int CalculateSize() { int _total_size_ = 0; if (point3map != null && point3map.Count != 0) { var entry = new Point3mapEntry(); foreach (var itor in point3map) { _total_size_ += 1; entry.key = itor.Key; entry.value = itor.Value; _total_size_ += ComputeSize.ComputeMessageSize(entry); } } return(_total_size_); }