Example #1
0
        void IterateInlineList(AbstractBufferedReader reader, IFieldHandler itemHandler, bool skipping)
        {
            var skip  = skipping || _visitor != null && !_visitor.StartList();
            var count = reader.ReadVUInt32();

            while (count-- > 0)
            {
                var skipItem = skip || _visitor != null && !_visitor.StartItem();
                IterateHandler(reader, itemHandler, skipItem, null);
                if (!skipItem)
                {
                    _visitor?.EndItem();
                }
            }
            if (!skip)
            {
                _visitor?.EndList();
            }
        }
Example #2
0
        void IterateInlineList(ref SpanReader reader, IFieldHandler itemHandler, bool skipping, HashSet <int>?knownInlineRefs)
        {
            var skip  = skipping || _visitor != null && !_visitor.StartList();
            var count = reader.ReadVUInt32();

            while (count-- > 0)
            {
                var skipItem = skip || _visitor != null && !_visitor.StartItem();
                IterateHandler(ref reader, itemHandler, skipItem, knownInlineRefs);
                if (!skipItem)
                {
                    _visitor?.EndItem();
                }
            }
            if (!skip)
            {
                _visitor?.EndList();
            }
        }