c1_unity/Assets/XLua/Gen/IronSourceSegmentWrap.cs
2025-11-03 15:00:43 +08:00

392 lines
14 KiB
C#

#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif
using XLua;
using System.Collections.Generic;
namespace XLua.CSObjectWrap
{
using Utils = XLua.Utils;
public class IronSourceSegmentWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(IronSourceSegment);
Utils.BeginObjectRegister(type, L, translator, 0, 2, 8, 8);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setCustom", _m_setCustom);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "getSegmentAsDict", _m_getSegmentAsDict);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "age", _g_get_age);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "gender", _g_get_gender);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "level", _g_get_level);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "isPaying", _g_get_isPaying);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "userCreationDate", _g_get_userCreationDate);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "iapt", _g_get_iapt);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "segmentName", _g_get_segmentName);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "customs", _g_get_customs);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "age", _s_set_age);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "gender", _s_set_gender);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "level", _s_set_level);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "isPaying", _s_set_isPaying);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "userCreationDate", _s_set_userCreationDate);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "iapt", _s_set_iapt);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "segmentName", _s_set_segmentName);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "customs", _s_set_customs);
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
Utils.EndClassRegister(type, L, translator);
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __CreateInstance(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
if(LuaAPI.lua_gettop(L) == 1)
{
var gen_ret = new IronSourceSegment();
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 IronSourceSegment constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_setCustom(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
{
string _key = LuaAPI.lua_tostring(L, 2);
string _value = LuaAPI.lua_tostring(L, 3);
gen_to_be_invoked.setCustom( _key, _value );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_getSegmentAsDict(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
{
var gen_ret = gen_to_be_invoked.getSegmentAsDict( );
translator.Push(L, gen_ret);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_age(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.age);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_gender(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushstring(L, gen_to_be_invoked.gender);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_level(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.level);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_isPaying(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.isPaying);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_userCreationDate(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushint64(L, gen_to_be_invoked.userCreationDate);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_iapt(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.iapt);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_segmentName(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushstring(L, gen_to_be_invoked.segmentName);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_customs(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.customs);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_age(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.age = LuaAPI.xlua_tointeger(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_gender(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.gender = LuaAPI.lua_tostring(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_level(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.level = LuaAPI.xlua_tointeger(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_isPaying(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.isPaying = LuaAPI.xlua_tointeger(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_userCreationDate(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.userCreationDate = LuaAPI.lua_toint64(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_iapt(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.iapt = LuaAPI.lua_tonumber(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_segmentName(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.segmentName = LuaAPI.lua_tostring(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_customs(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
IronSourceSegment gen_to_be_invoked = (IronSourceSegment)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.customs = (System.Collections.Generic.Dictionary<string, string>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<string, string>));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}