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