public void Persist(ref SpanWriter writer, DescriptorWriter nestedDescriptorWriter) { writer.WriteString(Name); writer.WriteVUInt32(_fields.Count); foreach (var pair in _fields) { writer.WriteString(pair.Key); nestedDescriptorWriter(ref writer, pair.Value); } }
public void Persist(ref SpanWriter writer, DescriptorWriter nestedDescriptorWriter) { writer.WriteString(_name); writer.WriteVUInt32((_signed ? 1u : 0) + (_flags ? 2u : 0) + 4u * (uint)_pairs.Count); foreach (var pair in _pairs) { writer.WriteString(pair.Key); if (_signed) { writer.WriteVInt64((long)pair.Value); } else { writer.WriteVUInt64(pair.Value); } } }