public override void Serialize(MongoDB.Bson.IO.BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options)
 {
     if (value == null)
     {
         bsonWriter.WriteNull();
     }
     else
     {
         var query = (QueryDocument)value;
         var json  = query.ToJson();
         bsonWriter.WriteString(json);
     }
 }
예제 #2
0
        static int _m_WriteNull(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.IO.BsonWriter gen_to_be_invoked = (MongoDB.Bson.IO.BsonWriter)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.WriteNull(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }