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


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


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <System.Action <MongoDB.Bson.Serialization.BsonSerializationContext.Builder> >(L, 2))
                {
                    System.Action <MongoDB.Bson.Serialization.BsonSerializationContext.Builder> _configurator = translator.GetDelegate <System.Action <MongoDB.Bson.Serialization.BsonSerializationContext.Builder> >(L, 2);

                    MongoDB.Bson.Serialization.BsonSerializationContext gen_ret = gen_to_be_invoked.With(_configurator);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 1)
                {
                    MongoDB.Bson.Serialization.BsonSerializationContext gen_ret = gen_to_be_invoked.With(  );
                    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.BsonSerializationContext.With!"));
        }