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


                MongoDB.Bson.Serialization.IdGenerators.ObjectIdGenerator gen_to_be_invoked = (MongoDB.Bson.Serialization.IdGenerators.ObjectIdGenerator)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));
            }
        }
Example #2
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    MongoDB.Bson.Serialization.IdGenerators.ObjectIdGenerator gen_ret = new MongoDB.Bson.Serialization.IdGenerators.ObjectIdGenerator();
                    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.Serialization.IdGenerators.ObjectIdGenerator constructor!"));
        }
Example #3
0
        static int _m_IsEmpty(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.Serialization.IdGenerators.ObjectIdGenerator gen_to_be_invoked = (MongoDB.Bson.Serialization.IdGenerators.ObjectIdGenerator)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));
            }
        }