// From IEnumerable<Field>. // Enumerating fields may result in MalformedMessageException. public IEnumerator <Field> GetEnumerator() { int start = _serialized.Offset; int end = _serialized.Offset + _serialized.Count; while (start != end) { yield return(Deserialization.ParseField(_serialized.Array, ref start, end)); } }
protected override long Deserialize(ArraySegment <byte> bytes) { return(Deserialization.ParseLong(bytes)); }