static int _m_GetSerializer(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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



                {
                    System.Type _type = (System.Type)translator.GetObject(L, 2, typeof(System.Type));
                    MongoDB.Bson.Serialization.IBsonSerializerRegistry _serializerRegistry = (MongoDB.Bson.Serialization.IBsonSerializerRegistry)translator.GetObject(L, 3, typeof(MongoDB.Bson.Serialization.IBsonSerializerRegistry));

                    MongoDB.Bson.Serialization.IBsonSerializer gen_ret = gen_to_be_invoked.GetSerializer(_type, _serializerRegistry);
                    translator.PushAny(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    MongoDB.Bson.Serialization.CollectionsSerializationProvider gen_ret = new MongoDB.Bson.Serialization.CollectionsSerializationProvider();
                    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.CollectionsSerializationProvider constructor!"));
        }