295 lines
11 KiB
C#
295 lines
11 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 ThinkingAnalyticsTDPresetPropertiesWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(ThinkingAnalytics.TDPresetProperties);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 1, 12, 0);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToEventPresetProperties", _m_ToEventPresetProperties);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "BundleId", _g_get_BundleId);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Carrier", _g_get_Carrier);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "DeviceId", _g_get_DeviceId);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "DeviceModel", _g_get_DeviceModel);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Manufacturer", _g_get_Manufacturer);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "NetworkType", _g_get_NetworkType);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "OS", _g_get_OS);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "OSVersion", _g_get_OSVersion);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ScreenHeight", _g_get_ScreenHeight);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ScreenWidth", _g_get_ScreenWidth);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "SystemLanguage", _g_get_SystemLanguage);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ZoneOffset", _g_get_ZoneOffset);
|
|
|
|
|
|
|
|
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) == 2 && translator.Assignable<System.Collections.Generic.Dictionary<string, object>>(L, 2))
|
|
{
|
|
System.Collections.Generic.Dictionary<string, object> _properties = (System.Collections.Generic.Dictionary<string, object>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<string, object>));
|
|
|
|
var gen_ret = new ThinkingAnalytics.TDPresetProperties(_properties);
|
|
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 ThinkingAnalytics.TDPresetProperties constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ToEventPresetProperties(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.ToEventPresetProperties( );
|
|
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_BundleId(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.BundleId);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Carrier(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Carrier);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_DeviceId(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.DeviceId);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_DeviceModel(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.DeviceModel);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Manufacturer(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.Manufacturer);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_NetworkType(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.NetworkType);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_OS(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.OS);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_OSVersion(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.OSVersion);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ScreenHeight(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushint64(L, gen_to_be_invoked.ScreenHeight);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ScreenWidth(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushint64(L, gen_to_be_invoked.ScreenWidth);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_SystemLanguage(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.SystemLanguage);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ZoneOffset(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
ThinkingAnalytics.TDPresetProperties gen_to_be_invoked = (ThinkingAnalytics.TDPresetProperties)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.ZoneOffset);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|