Ejemplo n.º 1
0
        protected override void ReadValueFromStream(Stream stream)
        {
            var pattern = BinUtils.ReadCString(stream);
            var options = BinUtils.ReadCString(stream).ToBSONOptions();

            Value = new BSONRegularExpression(pattern, options);
        }
Ejemplo n.º 2
0
        protected override void ReadValueFromStream(Stream stream)
        {
            BinUtils.ReadInt32(stream); // fullLength
            var length   = BinUtils.ReadInt32(stream);
            var code     = BinUtils.ReadCString(stream, length);
            var document = new BSONDocument(stream);

            Value = new BSONCodeWithScope(code, document);
        }
Ejemplo n.º 3
0
        protected BSONElement(Stream stream)
        {
            if (stream == null)
            {
                throw new BSONException(StringConsts.ARGUMENT_ERROR + "BSONElement.ctor(stream==null)");
            }

            m_Name = BinUtils.ReadCString(stream);
            ReadValueFromStream(stream);
        }
Ejemplo n.º 4
0
        protected override void ReadValueFromStream(Stream stream)
        {
            var length = BinUtils.ReadInt32(stream);

            Value = BinUtils.ReadCString(stream, length);
        }