Exemplo n.º 1
0
 internal byte[] ConvertToBytes(BsonHandle bson)
 {
     int size;
     IntPtr bsonPointer = _bsonToString(bson, out size);
     byte[] bsdata = new byte[size];
     Marshal.Copy(bsonPointer, bsdata, 0, bsdata.Length);
     return bsdata;
 }
Exemplo n.º 2
0
 internal BsonDocument ConvertToBsonDocument(BsonHandle bson)
 {
     var bsdata = ConvertToBytes(bson);
     return new BsonDocument(bsdata);
 }