static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 2 && translator.Assignable <MongoDB.Bson.BsonDocument>(L, 2))
                {
                    MongoDB.Bson.BsonDocument _document = (MongoDB.Bson.BsonDocument)translator.GetObject(L, 2, typeof(MongoDB.Bson.BsonDocument));

                    MongoDB.Bson.IO.BsonDocumentReader gen_ret = new MongoDB.Bson.IO.BsonDocumentReader(_document);
                    translator.Push(L, gen_ret);

                    return(1);
                }
                if (LuaAPI.lua_gettop(L) == 3 && translator.Assignable <MongoDB.Bson.BsonDocument>(L, 2) && translator.Assignable <MongoDB.Bson.IO.BsonDocumentReaderSettings>(L, 3))
                {
                    MongoDB.Bson.BsonDocument _document = (MongoDB.Bson.BsonDocument)translator.GetObject(L, 2, typeof(MongoDB.Bson.BsonDocument));
                    MongoDB.Bson.IO.BsonDocumentReaderSettings _settings = (MongoDB.Bson.IO.BsonDocumentReaderSettings)translator.GetObject(L, 3, typeof(MongoDB.Bson.IO.BsonDocumentReaderSettings));

                    MongoDB.Bson.IO.BsonDocumentReader gen_ret = new MongoDB.Bson.IO.BsonDocumentReader(_document, _settings);
                    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.IO.BsonDocumentReader constructor!"));
        }
示例#2
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    MongoDB.Bson.IO.BsonDocumentReaderSettings gen_ret = new MongoDB.Bson.IO.BsonDocumentReaderSettings();
                    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.IO.BsonDocumentReaderSettings constructor!"));
        }
示例#3
0
        static int _m_Clone(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    MongoDB.Bson.IO.BsonDocumentReaderSettings gen_ret = gen_to_be_invoked.Clone(  );
                    translator.Push(L, gen_ret);



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