コード例 #1
0
        public void Seal()
        {
            if (builder == null)
            {
                return;
            }
            builder.Close();
            VPackSlice slice = builder.Slice();

            for (int i = 0; i < slice.Length; i++)
            {
                VPackSlice key   = slice.KeyAt(i);
                VPackSlice value = slice.ValueAt(i);
                attributeToKey[key.ToStringUnchecked()] = value;
                keyToAttribute[value.ToInt32().Value]   = key;
            }
        }
コード例 #2
0
        public override int?ReadAsInt32()
        {
            if (currentSlice == null)
            {
                SetCurrentFromArray();
            }

            if (currentSlice == null)
            {
                return(null);
            }

            var value = currentSlice.ToInt32();

            SetToken(JsonToken.Integer, value);
            currentSlice = null;
            return(value);
        }