1700 lines
64 KiB
C#
1700 lines
64 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 SystemDateTimeOffsetWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(System.DateTimeOffset);
|
|
Utils.BeginObjectRegister(type, L, translator, 5, 21, 17, 0);
|
|
Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__add", __AddMeta);
|
|
Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__sub", __SubMeta);
|
|
Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__eq", __EqMeta);
|
|
Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__lt", __LTMeta);
|
|
Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__le", __LEMeta);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToOffset", _m_ToOffset);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Add", _m_Add);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddDays", _m_AddDays);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddHours", _m_AddHours);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddMilliseconds", _m_AddMilliseconds);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddMinutes", _m_AddMinutes);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddMonths", _m_AddMonths);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddSeconds", _m_AddSeconds);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddTicks", _m_AddTicks);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddYears", _m_AddYears);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CompareTo", _m_CompareTo);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Equals", _m_Equals);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "EqualsExact", _m_EqualsExact);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetHashCode", _m_GetHashCode);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Subtract", _m_Subtract);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToFileTime", _m_ToFileTime);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToUnixTimeSeconds", _m_ToUnixTimeSeconds);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToUnixTimeMilliseconds", _m_ToUnixTimeMilliseconds);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToLocalTime", _m_ToLocalTime);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToString", _m_ToString);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToUniversalTime", _m_ToUniversalTime);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "DateTime", _g_get_DateTime);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "UtcDateTime", _g_get_UtcDateTime);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "LocalDateTime", _g_get_LocalDateTime);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Date", _g_get_Date);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Day", _g_get_Day);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "DayOfWeek", _g_get_DayOfWeek);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "DayOfYear", _g_get_DayOfYear);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Hour", _g_get_Hour);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Millisecond", _g_get_Millisecond);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Minute", _g_get_Minute);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Month", _g_get_Month);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Offset", _g_get_Offset);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Second", _g_get_Second);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Ticks", _g_get_Ticks);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "UtcTicks", _g_get_UtcTicks);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "TimeOfDay", _g_get_TimeOfDay);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Year", _g_get_Year);
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 13, 2, 0);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Compare", _m_Compare_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Equals", _m_Equals_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "FromFileTime", _m_FromFileTime_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "FromUnixTimeSeconds", _m_FromUnixTimeSeconds_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "FromUnixTimeMilliseconds", _m_FromUnixTimeMilliseconds_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Parse", _m_Parse_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "ParseExact", _m_ParseExact_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "TryParse", _m_TryParse_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "TryParseExact", _m_TryParseExact_xlua_st_);
|
|
|
|
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MinValue", System.DateTimeOffset.MinValue);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MaxValue", System.DateTimeOffset.MaxValue);
|
|
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UnixEpoch", System.DateTimeOffset.UnixEpoch);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "Now", _g_get_Now);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "UtcNow", _g_get_UtcNow);
|
|
|
|
|
|
|
|
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) == 3 && (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) || LuaAPI.lua_isint64(L, 2)) && translator.Assignable<System.TimeSpan>(L, 3))
|
|
{
|
|
long _ticks = LuaAPI.lua_toint64(L, 2);
|
|
System.TimeSpan _offset;translator.Get(L, 3, out _offset);
|
|
|
|
var gen_ret = new System.DateTimeOffset(_ticks, _offset);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
if(LuaAPI.lua_gettop(L) == 2 && translator.Assignable<System.DateTime>(L, 2))
|
|
{
|
|
System.DateTime _dateTime;translator.Get(L, 2, out _dateTime);
|
|
|
|
var gen_ret = new System.DateTimeOffset(_dateTime);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
if(LuaAPI.lua_gettop(L) == 3 && translator.Assignable<System.DateTime>(L, 2) && translator.Assignable<System.TimeSpan>(L, 3))
|
|
{
|
|
System.DateTime _dateTime;translator.Get(L, 2, out _dateTime);
|
|
System.TimeSpan _offset;translator.Get(L, 3, out _offset);
|
|
|
|
var gen_ret = new System.DateTimeOffset(_dateTime, _offset);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
if(LuaAPI.lua_gettop(L) == 8 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 7) && translator.Assignable<System.TimeSpan>(L, 8))
|
|
{
|
|
int _year = LuaAPI.xlua_tointeger(L, 2);
|
|
int _month = LuaAPI.xlua_tointeger(L, 3);
|
|
int _day = LuaAPI.xlua_tointeger(L, 4);
|
|
int _hour = LuaAPI.xlua_tointeger(L, 5);
|
|
int _minute = LuaAPI.xlua_tointeger(L, 6);
|
|
int _second = LuaAPI.xlua_tointeger(L, 7);
|
|
System.TimeSpan _offset;translator.Get(L, 8, out _offset);
|
|
|
|
var gen_ret = new System.DateTimeOffset(_year, _month, _day, _hour, _minute, _second, _offset);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
if(LuaAPI.lua_gettop(L) == 9 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 7) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 8) && translator.Assignable<System.TimeSpan>(L, 9))
|
|
{
|
|
int _year = LuaAPI.xlua_tointeger(L, 2);
|
|
int _month = LuaAPI.xlua_tointeger(L, 3);
|
|
int _day = LuaAPI.xlua_tointeger(L, 4);
|
|
int _hour = LuaAPI.xlua_tointeger(L, 5);
|
|
int _minute = LuaAPI.xlua_tointeger(L, 6);
|
|
int _second = LuaAPI.xlua_tointeger(L, 7);
|
|
int _millisecond = LuaAPI.xlua_tointeger(L, 8);
|
|
System.TimeSpan _offset;translator.Get(L, 9, out _offset);
|
|
|
|
var gen_ret = new System.DateTimeOffset(_year, _month, _day, _hour, _minute, _second, _millisecond, _offset);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
if(LuaAPI.lua_gettop(L) == 10 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 7) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 8) && translator.Assignable<System.Globalization.Calendar>(L, 9) && translator.Assignable<System.TimeSpan>(L, 10))
|
|
{
|
|
int _year = LuaAPI.xlua_tointeger(L, 2);
|
|
int _month = LuaAPI.xlua_tointeger(L, 3);
|
|
int _day = LuaAPI.xlua_tointeger(L, 4);
|
|
int _hour = LuaAPI.xlua_tointeger(L, 5);
|
|
int _minute = LuaAPI.xlua_tointeger(L, 6);
|
|
int _second = LuaAPI.xlua_tointeger(L, 7);
|
|
int _millisecond = LuaAPI.xlua_tointeger(L, 8);
|
|
System.Globalization.Calendar _calendar = (System.Globalization.Calendar)translator.GetObject(L, 9, typeof(System.Globalization.Calendar));
|
|
System.TimeSpan _offset;translator.Get(L, 10, out _offset);
|
|
|
|
var gen_ret = new System.DateTimeOffset(_year, _month, _day, _hour, _minute, _second, _millisecond, _calendar, _offset);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
|
|
if (LuaAPI.lua_gettop(L) == 1)
|
|
{
|
|
translator.Push(L, default(System.DateTimeOffset));
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to System.DateTimeOffset constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __AddMeta(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
if (translator.Assignable<System.DateTimeOffset>(L, 1) && translator.Assignable<System.TimeSpan>(L, 2))
|
|
{
|
|
System.DateTimeOffset leftside;translator.Get(L, 1, out leftside);
|
|
System.TimeSpan rightside;translator.Get(L, 2, out rightside);
|
|
|
|
translator.Push(L, leftside + rightside);
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to right hand of + operator, need System.DateTimeOffset!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __SubMeta(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
if (translator.Assignable<System.DateTimeOffset>(L, 1) && translator.Assignable<System.TimeSpan>(L, 2))
|
|
{
|
|
System.DateTimeOffset leftside;translator.Get(L, 1, out leftside);
|
|
System.TimeSpan rightside;translator.Get(L, 2, out rightside);
|
|
|
|
translator.Push(L, leftside - rightside);
|
|
|
|
return 1;
|
|
}
|
|
|
|
|
|
if (translator.Assignable<System.DateTimeOffset>(L, 1) && translator.Assignable<System.DateTimeOffset>(L, 2))
|
|
{
|
|
System.DateTimeOffset leftside;translator.Get(L, 1, out leftside);
|
|
System.DateTimeOffset rightside;translator.Get(L, 2, out rightside);
|
|
|
|
translator.Push(L, leftside - rightside);
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to right hand of - operator, need System.DateTimeOffset!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __EqMeta(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
if (translator.Assignable<System.DateTimeOffset>(L, 1) && translator.Assignable<System.DateTimeOffset>(L, 2))
|
|
{
|
|
System.DateTimeOffset leftside;translator.Get(L, 1, out leftside);
|
|
System.DateTimeOffset rightside;translator.Get(L, 2, out rightside);
|
|
|
|
LuaAPI.lua_pushboolean(L, leftside == rightside);
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to right hand of == operator, need System.DateTimeOffset!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __LTMeta(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
if (translator.Assignable<System.DateTimeOffset>(L, 1) && translator.Assignable<System.DateTimeOffset>(L, 2))
|
|
{
|
|
System.DateTimeOffset leftside;translator.Get(L, 1, out leftside);
|
|
System.DateTimeOffset rightside;translator.Get(L, 2, out rightside);
|
|
|
|
LuaAPI.lua_pushboolean(L, leftside < rightside);
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to right hand of < operator, need System.DateTimeOffset!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int __LEMeta(RealStatePtr L)
|
|
{
|
|
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
if (translator.Assignable<System.DateTimeOffset>(L, 1) && translator.Assignable<System.DateTimeOffset>(L, 2))
|
|
{
|
|
System.DateTimeOffset leftside;translator.Get(L, 1, out leftside);
|
|
System.DateTimeOffset rightside;translator.Get(L, 2, out rightside);
|
|
|
|
LuaAPI.lua_pushboolean(L, leftside <= rightside);
|
|
|
|
return 1;
|
|
}
|
|
|
|
}
|
|
catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to right hand of <= operator, need System.DateTimeOffset!");
|
|
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ToOffset(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
System.TimeSpan _offset;translator.Get(L, 2, out _offset);
|
|
|
|
var gen_ret = gen_to_be_invoked.ToOffset( _offset );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Add(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
System.TimeSpan _timeSpan;translator.Get(L, 2, out _timeSpan);
|
|
|
|
var gen_ret = gen_to_be_invoked.Add( _timeSpan );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddDays(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
double _days = LuaAPI.lua_tonumber(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.AddDays( _days );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddHours(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
double _hours = LuaAPI.lua_tonumber(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.AddHours( _hours );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddMilliseconds(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
double _milliseconds = LuaAPI.lua_tonumber(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.AddMilliseconds( _milliseconds );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddMinutes(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
double _minutes = LuaAPI.lua_tonumber(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.AddMinutes( _minutes );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddMonths(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
int _months = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.AddMonths( _months );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddSeconds(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
double _seconds = LuaAPI.lua_tonumber(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.AddSeconds( _seconds );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddTicks(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
long _ticks = LuaAPI.lua_toint64(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.AddTicks( _ticks );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddYears(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
int _years = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.AddYears( _years );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Compare_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
System.DateTimeOffset _first;translator.Get(L, 1, out _first);
|
|
System.DateTimeOffset _second;translator.Get(L, 2, out _second);
|
|
|
|
var gen_ret = System.DateTimeOffset.Compare( _first, _second );
|
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_CompareTo(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
System.DateTimeOffset _other;translator.Get(L, 2, out _other);
|
|
|
|
var gen_ret = gen_to_be_invoked.CompareTo( _other );
|
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Equals(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 2&& translator.Assignable<object>(L, 2))
|
|
{
|
|
object _obj = translator.GetObject(L, 2, typeof(object));
|
|
|
|
var gen_ret = gen_to_be_invoked.Equals( _obj );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 2&& translator.Assignable<System.DateTimeOffset>(L, 2))
|
|
{
|
|
System.DateTimeOffset _other;translator.Get(L, 2, out _other);
|
|
|
|
var gen_ret = gen_to_be_invoked.Equals( _other );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to System.DateTimeOffset.Equals!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_EqualsExact(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
System.DateTimeOffset _other;translator.Get(L, 2, out _other);
|
|
|
|
var gen_ret = gen_to_be_invoked.EqualsExact( _other );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Equals_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
System.DateTimeOffset _first;translator.Get(L, 1, out _first);
|
|
System.DateTimeOffset _second;translator.Get(L, 2, out _second);
|
|
|
|
var gen_ret = System.DateTimeOffset.Equals( _first, _second );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_FromFileTime_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
long _fileTime = LuaAPI.lua_toint64(L, 1);
|
|
|
|
var gen_ret = System.DateTimeOffset.FromFileTime( _fileTime );
|
|
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 _m_FromUnixTimeSeconds_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
long _seconds = LuaAPI.lua_toint64(L, 1);
|
|
|
|
var gen_ret = System.DateTimeOffset.FromUnixTimeSeconds( _seconds );
|
|
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 _m_FromUnixTimeMilliseconds_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
long _milliseconds = LuaAPI.lua_toint64(L, 1);
|
|
|
|
var gen_ret = System.DateTimeOffset.FromUnixTimeMilliseconds( _milliseconds );
|
|
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 _m_GetHashCode(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetHashCode( );
|
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Parse_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
|
|
var gen_ret = System.DateTimeOffset.Parse( _input );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.IFormatProvider>(L, 2))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 2, typeof(System.IFormatProvider));
|
|
|
|
var gen_ret = System.DateTimeOffset.Parse( _input, _formatProvider );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.IFormatProvider>(L, 2)&& translator.Assignable<System.Globalization.DateTimeStyles>(L, 3))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 2, typeof(System.IFormatProvider));
|
|
System.Globalization.DateTimeStyles _styles;translator.Get(L, 3, out _styles);
|
|
|
|
var gen_ret = System.DateTimeOffset.Parse( _input, _formatProvider, _styles );
|
|
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 System.DateTimeOffset.Parse!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ParseExact_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.IFormatProvider>(L, 3))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
string _format = LuaAPI.lua_tostring(L, 2);
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 3, typeof(System.IFormatProvider));
|
|
|
|
var gen_ret = System.DateTimeOffset.ParseExact( _input, _format, _formatProvider );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 4&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.IFormatProvider>(L, 3)&& translator.Assignable<System.Globalization.DateTimeStyles>(L, 4))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
string _format = LuaAPI.lua_tostring(L, 2);
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 3, typeof(System.IFormatProvider));
|
|
System.Globalization.DateTimeStyles _styles;translator.Get(L, 4, out _styles);
|
|
|
|
var gen_ret = System.DateTimeOffset.ParseExact( _input, _format, _formatProvider, _styles );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 4&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<string[]>(L, 2)&& translator.Assignable<System.IFormatProvider>(L, 3)&& translator.Assignable<System.Globalization.DateTimeStyles>(L, 4))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
string[] _formats = (string[])translator.GetObject(L, 2, typeof(string[]));
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 3, typeof(System.IFormatProvider));
|
|
System.Globalization.DateTimeStyles _styles;translator.Get(L, 4, out _styles);
|
|
|
|
var gen_ret = System.DateTimeOffset.ParseExact( _input, _formats, _formatProvider, _styles );
|
|
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 System.DateTimeOffset.ParseExact!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Subtract(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 2&& translator.Assignable<System.DateTimeOffset>(L, 2))
|
|
{
|
|
System.DateTimeOffset _value;translator.Get(L, 2, out _value);
|
|
|
|
var gen_ret = gen_to_be_invoked.Subtract( _value );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 2&& translator.Assignable<System.TimeSpan>(L, 2))
|
|
{
|
|
System.TimeSpan _value;translator.Get(L, 2, out _value);
|
|
|
|
var gen_ret = gen_to_be_invoked.Subtract( _value );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to System.DateTimeOffset.Subtract!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ToFileTime(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.ToFileTime( );
|
|
LuaAPI.lua_pushint64(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ToUnixTimeSeconds(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.ToUnixTimeSeconds( );
|
|
LuaAPI.lua_pushint64(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ToUnixTimeMilliseconds(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.ToUnixTimeMilliseconds( );
|
|
LuaAPI.lua_pushint64(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ToLocalTime(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.ToLocalTime( );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ToString(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 1)
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.ToString( );
|
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _format = LuaAPI.lua_tostring(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.ToString( _format );
|
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 2&& translator.Assignable<System.IFormatProvider>(L, 2))
|
|
{
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 2, typeof(System.IFormatProvider));
|
|
|
|
var gen_ret = gen_to_be_invoked.ToString( _formatProvider );
|
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.IFormatProvider>(L, 3))
|
|
{
|
|
string _format = LuaAPI.lua_tostring(L, 2);
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 3, typeof(System.IFormatProvider));
|
|
|
|
var gen_ret = gen_to_be_invoked.ToString( _format, _formatProvider );
|
|
LuaAPI.lua_pushstring(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to System.DateTimeOffset.ToString!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ToUniversalTime(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.ToUniversalTime( );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
translator.Update(L, 1, gen_to_be_invoked);
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_TryParse_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
System.DateTimeOffset _result;
|
|
|
|
var gen_ret = System.DateTimeOffset.TryParse( _input, out _result );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
translator.Push(L, _result);
|
|
|
|
|
|
|
|
|
|
return 2;
|
|
}
|
|
if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.IFormatProvider>(L, 2)&& translator.Assignable<System.Globalization.DateTimeStyles>(L, 3))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 2, typeof(System.IFormatProvider));
|
|
System.Globalization.DateTimeStyles _styles;translator.Get(L, 3, out _styles);
|
|
System.DateTimeOffset _result;
|
|
|
|
var gen_ret = System.DateTimeOffset.TryParse( _input, _formatProvider, _styles, out _result );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
translator.Push(L, _result);
|
|
|
|
|
|
|
|
|
|
return 2;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to System.DateTimeOffset.TryParse!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_TryParseExact_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 4&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& translator.Assignable<System.IFormatProvider>(L, 3)&& translator.Assignable<System.Globalization.DateTimeStyles>(L, 4))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
string _format = LuaAPI.lua_tostring(L, 2);
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 3, typeof(System.IFormatProvider));
|
|
System.Globalization.DateTimeStyles _styles;translator.Get(L, 4, out _styles);
|
|
System.DateTimeOffset _result;
|
|
|
|
var gen_ret = System.DateTimeOffset.TryParseExact( _input, _format, _formatProvider, _styles, out _result );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
translator.Push(L, _result);
|
|
|
|
|
|
|
|
|
|
return 2;
|
|
}
|
|
if(gen_param_count == 4&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& translator.Assignable<string[]>(L, 2)&& translator.Assignable<System.IFormatProvider>(L, 3)&& translator.Assignable<System.Globalization.DateTimeStyles>(L, 4))
|
|
{
|
|
string _input = LuaAPI.lua_tostring(L, 1);
|
|
string[] _formats = (string[])translator.GetObject(L, 2, typeof(string[]));
|
|
System.IFormatProvider _formatProvider = (System.IFormatProvider)translator.GetObject(L, 3, typeof(System.IFormatProvider));
|
|
System.Globalization.DateTimeStyles _styles;translator.Get(L, 4, out _styles);
|
|
System.DateTimeOffset _result;
|
|
|
|
var gen_ret = System.DateTimeOffset.TryParseExact( _input, _formats, _formatProvider, _styles, out _result );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
translator.Push(L, _result);
|
|
|
|
|
|
|
|
|
|
return 2;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to System.DateTimeOffset.TryParseExact!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Now(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
translator.Push(L, System.DateTimeOffset.Now);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_UtcNow(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
translator.Push(L, System.DateTimeOffset.UtcNow);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_DateTime(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.Push(L, gen_to_be_invoked.DateTime);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_UtcDateTime(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.Push(L, gen_to_be_invoked.UtcDateTime);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_LocalDateTime(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.Push(L, gen_to_be_invoked.LocalDateTime);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Date(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.Push(L, gen_to_be_invoked.Date);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Day(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Day);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_DayOfWeek(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.PushSystemDayOfWeek(L, gen_to_be_invoked.DayOfWeek);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_DayOfYear(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.DayOfYear);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Hour(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Hour);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Millisecond(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Millisecond);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Minute(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Minute);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Month(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Month);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Offset(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.Push(L, gen_to_be_invoked.Offset);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Second(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Second);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Ticks(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.lua_pushint64(L, gen_to_be_invoked.Ticks);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_UtcTicks(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.lua_pushint64(L, gen_to_be_invoked.UtcTicks);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_TimeOfDay(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
translator.Push(L, gen_to_be_invoked.TimeOfDay);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Year(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
System.DateTimeOffset gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
|
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Year);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|