示例#1
0
        static int _m_GenerateId(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.Serialization.IIdGenerator gen_to_be_invoked = (MongoDB.Bson.Serialization.IIdGenerator)translator.FastGetCSObj(L, 1);



                {
                    object _container = translator.GetObject(L, 2, typeof(object));
                    object _document  = translator.GetObject(L, 3, typeof(object));

                    object gen_ret = gen_to_be_invoked.GenerateId(_container, _document);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_LookupIdGenerator_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    System.Type _type = (System.Type)translator.GetObject(L, 1, typeof(System.Type));

                    MongoDB.Bson.Serialization.IIdGenerator gen_ret = MongoDB.Bson.Serialization.BsonSerializer.LookupIdGenerator(_type);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int _m_RegisterIdGenerator_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    System.Type _type = (System.Type)translator.GetObject(L, 1, typeof(System.Type));
                    MongoDB.Bson.Serialization.IIdGenerator _idGenerator = (MongoDB.Bson.Serialization.IIdGenerator)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.IIdGenerator));

                    MongoDB.Bson.Serialization.BsonSerializer.RegisterIdGenerator(_type, _idGenerator);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
示例#4
0
        static int _m_IsEmpty(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.Serialization.IIdGenerator gen_to_be_invoked = (MongoDB.Bson.Serialization.IIdGenerator)translator.FastGetCSObj(L, 1);



                {
                    object _id = translator.GetObject(L, 2, typeof(object));

                    bool gen_ret = gen_to_be_invoked.IsEmpty(_id);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
示例#5
0
        static int _m_SetIdGenerator(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.Serialization.BsonMemberMap gen_to_be_invoked = (MongoDB.Bson.Serialization.BsonMemberMap)translator.FastGetCSObj(L, 1);



                {
                    MongoDB.Bson.Serialization.IIdGenerator _idGenerator = (MongoDB.Bson.Serialization.IIdGenerator)translator.GetObject(L, 2, typeof(MongoDB.Bson.Serialization.IIdGenerator));

                    MongoDB.Bson.Serialization.BsonMemberMap gen_ret = gen_to_be_invoked.SetIdGenerator(_idGenerator);
                    translator.Push(L, gen_ret);



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