예제 #1
0
        object?DeserializeNullableItem(MapItemInfo info, bool skipHeader)
        {
            if (info.IsNullable)
            {
                EnsureReadHeader();
                if (!_currentHeader.ReadBit())
                {
                    return(null);
                }
                skipHeader = true;
            }

            return(DeserializeItemNoSetup(info, skipHeader));
        }
예제 #2
0
        public object?DeserializeItem(MapItemInfo info, ref BitSource header)
        {
            // Do null checks
            if (!info.IsValueTypeItem && !header.ReadBit())
            {
                return(null);
            }

            _currentHeader = header;
            _readHeader    = true;
            return(DeserializeNullableItem(info, false));
        }
예제 #3
0
        public object?DeserializeItem(MapItemInfo info)
        {
            // Do null checks
            if (info.IsValueTypeItem)
            {
                _currentHeader = new BitSource()
                {
                    Deserializer = this
                };
                _readHeader = false;
            }
            else
            {
                _currentHeader = new BitSource(this);
                if (!_currentHeader.ReadBit())
                {
                    return(null);
                }

                _readHeader = true;
            }

            return(DeserializeNullableItem(info, false));
        }