Exemple #1
0
        // 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));
            }
        }
Exemple #2
0
 protected override long Deserialize(ArraySegment <byte> bytes)
 {
     return(Deserialization.ParseLong(bytes));
 }