コード例 #1
0
        static int _s_set_MapOldBinaryToByteArray(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                MongoDB.Bson.BsonTypeMapperOptions gen_to_be_invoked = (MongoDB.Bson.BsonTypeMapperOptions)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.MapOldBinaryToByteArray = LuaAPI.lua_toboolean(L, 2);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
コード例 #2
0
        static int _s_set_MapBsonDocumentTo(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                MongoDB.Bson.BsonTypeMapperOptions gen_to_be_invoked = (MongoDB.Bson.BsonTypeMapperOptions)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.MapBsonDocumentTo = (System.Type)translator.GetObject(L, 2, typeof(System.Type));
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
コード例 #3
0
        static int _g_get_MapBsonArrayTo(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                MongoDB.Bson.BsonTypeMapperOptions gen_to_be_invoked = (MongoDB.Bson.BsonTypeMapperOptions)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.MapBsonArrayTo);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
コード例 #4
0
        static int _s_set_DuplicateNameHandling(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                MongoDB.Bson.BsonTypeMapperOptions gen_to_be_invoked = (MongoDB.Bson.BsonTypeMapperOptions)translator.FastGetCSObj(L, 1);
                MongoDB.Bson.DuplicateNameHandling gen_value; translator.Get(L, 2, out gen_value);
                gen_to_be_invoked.DuplicateNameHandling = gen_value;
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(0);
        }
コード例 #5
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    MongoDB.Bson.BsonTypeMapperOptions gen_ret = new MongoDB.Bson.BsonTypeMapperOptions();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to MongoDB.Bson.BsonTypeMapperOptions constructor!"));
        }
コード例 #6
0
        static int _m_MapToDotNetValue_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 1 && translator.Assignable <MongoDB.Bson.BsonValue>(L, 1))
                {
                    MongoDB.Bson.BsonValue _bsonValue = (MongoDB.Bson.BsonValue)translator.GetObject(L, 1, typeof(MongoDB.Bson.BsonValue));

                    object gen_ret = MongoDB.Bson.BsonTypeMapper.MapToDotNetValue(_bsonValue);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <MongoDB.Bson.BsonValue>(L, 1) && translator.Assignable <MongoDB.Bson.BsonTypeMapperOptions>(L, 2))
                {
                    MongoDB.Bson.BsonValue             _bsonValue = (MongoDB.Bson.BsonValue)translator.GetObject(L, 1, typeof(MongoDB.Bson.BsonValue));
                    MongoDB.Bson.BsonTypeMapperOptions _options   = (MongoDB.Bson.BsonTypeMapperOptions)translator.GetObject(L, 2, typeof(MongoDB.Bson.BsonTypeMapperOptions));

                    object gen_ret = MongoDB.Bson.BsonTypeMapper.MapToDotNetValue(_bsonValue, _options);
                    translator.PushAny(L, gen_ret);



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

            return(LuaAPI.luaL_error(L, "invalid arguments to MongoDB.Bson.BsonTypeMapper.MapToDotNetValue!"));
        }