public override object Deserialize(MongoDB.Bson.IO.BsonReader bsonReader, Type nominalType, Type actualType, IBsonSerializationOptions options) { if (bsonReader.GetCurrentBsonType() == BsonType.Null) { bsonReader.ReadNull(); return(null); } else { var value = bsonReader.ReadString(); var doc = BsonDocument.Parse(value); var query = new QueryDocument(doc); return(query); } }
static int _m_ReadNull(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); MongoDB.Bson.IO.BsonReader gen_to_be_invoked = (MongoDB.Bson.IO.BsonReader)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.ReadNull( ); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }