예제 #1
0
 public U3(KaitaiStream p__io, Bson.ObjectId p__parent = null, Bson p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     f_value  = false;
     _read();
 }
예제 #2
0
 public BinData(KaitaiStream p__io, Bson.Element p__parent = null, Bson p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }
예제 #3
0
 public ObjectId(KaitaiStream p__io, KaitaiStruct p__parent = null, Bson p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }
예제 #4
0
 private void _read()
 {
     _id     = m_io.ReadS4le();
     _source = new String(m_io, this, m_root);
     _scope  = new Bson(m_io);
 }
예제 #5
0
 public CodeWithScope(KaitaiStream p__io, Bson.Element p__parent = null, Bson p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }
예제 #6
0
            private void _read()
            {
                _typeByte = ((BsonType)m_io.ReadU1());
                _name     = new Cstring(m_io, this, m_root);
                switch (TypeByte)
                {
                case BsonType.NumberDouble: {
                    _content = m_io.ReadF8le();
                    break;
                }

                case BsonType.CodeWithScope: {
                    _content = new CodeWithScope(m_io, this, m_root);
                    break;
                }

                case BsonType.ObjectId: {
                    _content = new ObjectId(m_io, this, m_root);
                    break;
                }

                case BsonType.String: {
                    _content = new String(m_io, this, m_root);
                    break;
                }

                case BsonType.RegEx: {
                    _content = new RegEx(m_io, this, m_root);
                    break;
                }

                case BsonType.NumberDecimal: {
                    _content = new F16(m_io, this, m_root);
                    break;
                }

                case BsonType.UtcDatetime: {
                    _content = m_io.ReadS8le();
                    break;
                }

                case BsonType.NumberLong: {
                    _content = m_io.ReadS8le();
                    break;
                }

                case BsonType.Timestamp: {
                    _content = new Timestamp(m_io, this, m_root);
                    break;
                }

                case BsonType.DbPointer: {
                    _content = new DbPointer(m_io, this, m_root);
                    break;
                }

                case BsonType.Array: {
                    _content = new Bson(m_io);
                    break;
                }

                case BsonType.Javascript: {
                    _content = new String(m_io, this, m_root);
                    break;
                }

                case BsonType.Boolean: {
                    _content = m_io.ReadU1();
                    break;
                }

                case BsonType.Document: {
                    _content = new Bson(m_io);
                    break;
                }

                case BsonType.Symbol: {
                    _content = new String(m_io, this, m_root);
                    break;
                }

                case BsonType.NumberInt: {
                    _content = m_io.ReadS4le();
                    break;
                }

                case BsonType.BinData: {
                    _content = new BinData(m_io, this, m_root);
                    break;
                }
                }
            }
예제 #7
0
 public ElementsList(KaitaiStream p__io, Bson p__parent = null, Bson p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }
예제 #8
0
 public Bson(KaitaiStream p__io, KaitaiStruct p__parent = null, Bson p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root ?? this;
     _read();
 }
예제 #9
0
 public ByteArrayDeprecated(KaitaiStream p__io, Bson.BinData p__parent = null, Bson p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }