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!"));
        }
        static int _m_SkipValue(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    gen_to_be_invoked.SkipValue(  );



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


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



                {
                    long gen_ret = gen_to_be_invoked.ReadTimestamp(  );
                    LuaAPI.lua_pushint64(L, gen_ret);



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


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



                {
                    MongoDB.Bson.BsonRegularExpression gen_ret = gen_to_be_invoked.ReadRegularExpression(  );
                    translator.Push(L, gen_ret);



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


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



                {
                    MongoDB.Bson.IO.BsonReaderBookmark _bookmark = (MongoDB.Bson.IO.BsonReaderBookmark)translator.GetObject(L, 2, typeof(MongoDB.Bson.IO.BsonReaderBookmark));

                    gen_to_be_invoked.ReturnToBookmark(_bookmark);



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


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



                {
                    MongoDB.Bson.IO.INameDecoder _nameDecoder = (MongoDB.Bson.IO.INameDecoder)translator.GetObject(L, 2, typeof(MongoDB.Bson.IO.INameDecoder));

                    string gen_ret = gen_to_be_invoked.ReadName(_nameDecoder);
                    LuaAPI.lua_pushstring(L, gen_ret);



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