|
|
- //this source code was auto-generated by tolua#, do not modify it
- using System;
- using LuaInterface;
-
- public class System_DateTimeWrap
- {
- public static void Register(LuaState L)
- {
- L.BeginClass(typeof(System.DateTime), null);
- L.RegFunction("Add", Add);
- L.RegFunction("AddDays", AddDays);
- L.RegFunction("AddHours", AddHours);
- L.RegFunction("AddMilliseconds", AddMilliseconds);
- L.RegFunction("AddMinutes", AddMinutes);
- L.RegFunction("AddMonths", AddMonths);
- L.RegFunction("AddSeconds", AddSeconds);
- L.RegFunction("AddTicks", AddTicks);
- L.RegFunction("AddYears", AddYears);
- L.RegFunction("Compare", Compare);
- L.RegFunction("CompareTo", CompareTo);
- L.RegFunction("DaysInMonth", DaysInMonth);
- L.RegFunction("Equals", Equals);
- L.RegFunction("FromBinary", FromBinary);
- L.RegFunction("FromFileTime", FromFileTime);
- L.RegFunction("FromFileTimeUtc", FromFileTimeUtc);
- L.RegFunction("FromOADate", FromOADate);
- L.RegFunction("IsDaylightSavingTime", IsDaylightSavingTime);
- L.RegFunction("SpecifyKind", SpecifyKind);
- L.RegFunction("ToBinary", ToBinary);
- L.RegFunction("GetHashCode", GetHashCode);
- L.RegFunction("IsLeapYear", IsLeapYear);
- L.RegFunction("Parse", Parse);
- L.RegFunction("ParseExact", ParseExact);
- L.RegFunction("Subtract", Subtract);
- L.RegFunction("ToOADate", ToOADate);
- L.RegFunction("ToFileTime", ToFileTime);
- L.RegFunction("ToFileTimeUtc", ToFileTimeUtc);
- L.RegFunction("ToLocalTime", ToLocalTime);
- L.RegFunction("ToLongDateString", ToLongDateString);
- L.RegFunction("ToLongTimeString", ToLongTimeString);
- L.RegFunction("ToShortDateString", ToShortDateString);
- L.RegFunction("ToShortTimeString", ToShortTimeString);
- L.RegFunction("ToString", ToString);
- L.RegFunction("ToUniversalTime", ToUniversalTime);
- L.RegFunction("TryParse", TryParse);
- L.RegFunction("TryParseExact", TryParseExact);
- L.RegFunction("GetDateTimeFormats", GetDateTimeFormats);
- L.RegFunction("GetTypeCode", GetTypeCode);
- L.RegFunction("New", _CreateSystem_DateTime);
- L.RegFunction("__add", op_Addition);
- L.RegFunction("__sub", op_Subtraction);
- L.RegFunction("__eq", op_Equality);
- L.RegFunction("__tostring", ToLua.op_ToString);
- L.RegVar("MinValue", get_MinValue, null);
- L.RegVar("MaxValue", get_MaxValue, null);
- L.RegVar("Date", get_Date, null);
- L.RegVar("Day", get_Day, null);
- L.RegVar("DayOfWeek", get_DayOfWeek, null);
- L.RegVar("DayOfYear", get_DayOfYear, null);
- L.RegVar("Hour", get_Hour, null);
- L.RegVar("Kind", get_Kind, null);
- L.RegVar("Millisecond", get_Millisecond, null);
- L.RegVar("Minute", get_Minute, null);
- L.RegVar("Month", get_Month, null);
- L.RegVar("Now", get_Now, null);
- L.RegVar("UtcNow", get_UtcNow, null);
- L.RegVar("Second", get_Second, null);
- L.RegVar("Ticks", get_Ticks, null);
- L.RegVar("TimeOfDay", get_TimeOfDay, null);
- L.RegVar("Today", get_Today, null);
- L.RegVar("Year", get_Year, null);
- L.EndClass();
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _CreateSystem_DateTime(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 1)
- {
- long arg0 = LuaDLL.tolua_checkint64(L, 1);
- System.DateTime obj = new System.DateTime(arg0);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(long), typeof(System.DateTimeKind)))
- {
- long arg0 = LuaDLL.tolua_checkint64(L, 1);
- System.DateTimeKind arg1 = (System.DateTimeKind)ToLua.CheckObject(L, 2, typeof(System.DateTimeKind));
- System.DateTime obj = new System.DateTime(arg0, arg1);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(int)))
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- System.DateTime obj = new System.DateTime(arg0, arg1, arg2);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(int), typeof(System.Globalization.Calendar)))
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- System.Globalization.Calendar arg3 = (System.Globalization.Calendar)ToLua.CheckObject(L, 4, typeof(System.Globalization.Calendar));
- System.DateTime obj = new System.DateTime(arg0, arg1, arg2, arg3);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 6 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int)))
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- int arg3 = (int)LuaDLL.luaL_checknumber(L, 4);
- int arg4 = (int)LuaDLL.luaL_checknumber(L, 5);
- int arg5 = (int)LuaDLL.luaL_checknumber(L, 6);
- System.DateTime obj = new System.DateTime(arg0, arg1, arg2, arg3, arg4, arg5);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 7 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(System.DateTimeKind)))
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- int arg3 = (int)LuaDLL.luaL_checknumber(L, 4);
- int arg4 = (int)LuaDLL.luaL_checknumber(L, 5);
- int arg5 = (int)LuaDLL.luaL_checknumber(L, 6);
- System.DateTimeKind arg6 = (System.DateTimeKind)ToLua.CheckObject(L, 7, typeof(System.DateTimeKind));
- System.DateTime obj = new System.DateTime(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 7 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(System.Globalization.Calendar)))
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- int arg3 = (int)LuaDLL.luaL_checknumber(L, 4);
- int arg4 = (int)LuaDLL.luaL_checknumber(L, 5);
- int arg5 = (int)LuaDLL.luaL_checknumber(L, 6);
- System.Globalization.Calendar arg6 = (System.Globalization.Calendar)ToLua.CheckObject(L, 7, typeof(System.Globalization.Calendar));
- System.DateTime obj = new System.DateTime(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 7 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int)))
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- int arg3 = (int)LuaDLL.luaL_checknumber(L, 4);
- int arg4 = (int)LuaDLL.luaL_checknumber(L, 5);
- int arg5 = (int)LuaDLL.luaL_checknumber(L, 6);
- int arg6 = (int)LuaDLL.luaL_checknumber(L, 7);
- System.DateTime obj = new System.DateTime(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 8 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(System.DateTimeKind)))
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- int arg3 = (int)LuaDLL.luaL_checknumber(L, 4);
- int arg4 = (int)LuaDLL.luaL_checknumber(L, 5);
- int arg5 = (int)LuaDLL.luaL_checknumber(L, 6);
- int arg6 = (int)LuaDLL.luaL_checknumber(L, 7);
- System.DateTimeKind arg7 = (System.DateTimeKind)ToLua.CheckObject(L, 8, typeof(System.DateTimeKind));
- System.DateTime obj = new System.DateTime(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 8 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(System.Globalization.Calendar)))
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- int arg3 = (int)LuaDLL.luaL_checknumber(L, 4);
- int arg4 = (int)LuaDLL.luaL_checknumber(L, 5);
- int arg5 = (int)LuaDLL.luaL_checknumber(L, 6);
- int arg6 = (int)LuaDLL.luaL_checknumber(L, 7);
- System.Globalization.Calendar arg7 = (System.Globalization.Calendar)ToLua.CheckObject(L, 8, typeof(System.Globalization.Calendar));
- System.DateTime obj = new System.DateTime(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 9 && TypeChecker.CheckTypes(L, 1, typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(System.Globalization.Calendar), typeof(System.DateTimeKind)))
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- int arg3 = (int)LuaDLL.luaL_checknumber(L, 4);
- int arg4 = (int)LuaDLL.luaL_checknumber(L, 5);
- int arg5 = (int)LuaDLL.luaL_checknumber(L, 6);
- int arg6 = (int)LuaDLL.luaL_checknumber(L, 7);
- System.Globalization.Calendar arg7 = (System.Globalization.Calendar)ToLua.CheckObject(L, 8, typeof(System.Globalization.Calendar));
- System.DateTimeKind arg8 = (System.DateTimeKind)ToLua.CheckObject(L, 9, typeof(System.DateTimeKind));
- System.DateTime obj = new System.DateTime(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
- ToLua.PushValue(L, obj);
- return 1;
- }
- else if (count == 0)
- {
- System.DateTime obj = new System.DateTime();
- ToLua.PushValue(L, obj);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: System.DateTime.New");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Add(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- System.TimeSpan arg0 = (System.TimeSpan)ToLua.CheckObject(L, 2, typeof(System.TimeSpan));
- System.DateTime o = obj.Add(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int AddDays(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- double arg0 = (double)LuaDLL.luaL_checknumber(L, 2);
- System.DateTime o = obj.AddDays(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int AddHours(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- double arg0 = (double)LuaDLL.luaL_checknumber(L, 2);
- System.DateTime o = obj.AddHours(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int AddMilliseconds(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- double arg0 = (double)LuaDLL.luaL_checknumber(L, 2);
- System.DateTime o = obj.AddMilliseconds(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int AddMinutes(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- double arg0 = (double)LuaDLL.luaL_checknumber(L, 2);
- System.DateTime o = obj.AddMinutes(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int AddMonths(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
- System.DateTime o = obj.AddMonths(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int AddSeconds(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- double arg0 = (double)LuaDLL.luaL_checknumber(L, 2);
- System.DateTime o = obj.AddSeconds(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int AddTicks(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- long arg0 = LuaDLL.tolua_checkint64(L, 2);
- System.DateTime o = obj.AddTicks(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int AddYears(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
- System.DateTime o = obj.AddYears(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Compare(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime arg0 = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- System.DateTime arg1 = (System.DateTime)ToLua.CheckObject(L, 2, typeof(System.DateTime));
- int o = System.DateTime.Compare(arg0, arg1);
- LuaDLL.lua_pushinteger(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int CompareTo(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(System.DateTime)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- System.DateTime arg0 = (System.DateTime)ToLua.ToObject(L, 2);
- int o = obj.CompareTo(arg0);
- LuaDLL.lua_pushinteger(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(object)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- object arg0 = ToLua.ToVarObject(L, 2);
- int o = obj.CompareTo(arg0);
- LuaDLL.lua_pushinteger(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.CompareTo");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int DaysInMonth(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int o = System.DateTime.DaysInMonth(arg0, arg1);
- LuaDLL.lua_pushinteger(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Equals(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(System.DateTime)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- System.DateTime arg0 = (System.DateTime)ToLua.ToObject(L, 2);
- bool o = obj.Equals(arg0);
- LuaDLL.lua_pushboolean(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(object)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- object arg0 = ToLua.ToVarObject(L, 2);
- bool o = obj.Equals(arg0);
- LuaDLL.lua_pushboolean(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.Equals");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int FromBinary(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- long arg0 = LuaDLL.tolua_checkint64(L, 1);
- System.DateTime o = System.DateTime.FromBinary(arg0);
- ToLua.PushValue(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int FromFileTime(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- long arg0 = LuaDLL.tolua_checkint64(L, 1);
- System.DateTime o = System.DateTime.FromFileTime(arg0);
- ToLua.PushValue(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int FromFileTimeUtc(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- long arg0 = LuaDLL.tolua_checkint64(L, 1);
- System.DateTime o = System.DateTime.FromFileTimeUtc(arg0);
- ToLua.PushValue(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int FromOADate(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- double arg0 = (double)LuaDLL.luaL_checknumber(L, 1);
- System.DateTime o = System.DateTime.FromOADate(arg0);
- ToLua.PushValue(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int IsDaylightSavingTime(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- bool o = obj.IsDaylightSavingTime();
- LuaDLL.lua_pushboolean(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int SpecifyKind(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime arg0 = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- System.DateTimeKind arg1 = (System.DateTimeKind)ToLua.CheckObject(L, 2, typeof(System.DateTimeKind));
- System.DateTime o = System.DateTime.SpecifyKind(arg0, arg1);
- ToLua.PushValue(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToBinary(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- long o = obj.ToBinary();
- LuaDLL.tolua_pushint64(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetHashCode(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- int o = obj.GetHashCode();
- LuaDLL.lua_pushinteger(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int IsLeapYear(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- bool o = System.DateTime.IsLeapYear(arg0);
- LuaDLL.lua_pushboolean(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Parse(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
- {
- string arg0 = ToLua.ToString(L, 1);
- System.DateTime o = System.DateTime.Parse(arg0);
- ToLua.PushValue(L, o);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(System.IFormatProvider)))
- {
- string arg0 = ToLua.ToString(L, 1);
- System.IFormatProvider arg1 = (System.IFormatProvider)ToLua.ToObject(L, 2);
- System.DateTime o = System.DateTime.Parse(arg0, arg1);
- ToLua.PushValue(L, o);
- return 1;
- }
- else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(System.IFormatProvider), typeof(System.Globalization.DateTimeStyles)))
- {
- string arg0 = ToLua.ToString(L, 1);
- System.IFormatProvider arg1 = (System.IFormatProvider)ToLua.ToObject(L, 2);
- System.Globalization.DateTimeStyles arg2 = (System.Globalization.DateTimeStyles)ToLua.ToObject(L, 3);
- System.DateTime o = System.DateTime.Parse(arg0, arg1, arg2);
- ToLua.PushValue(L, o);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.Parse");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ParseExact(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(string), typeof(System.IFormatProvider)))
- {
- string arg0 = ToLua.ToString(L, 1);
- string arg1 = ToLua.ToString(L, 2);
- System.IFormatProvider arg2 = (System.IFormatProvider)ToLua.ToObject(L, 3);
- System.DateTime o = System.DateTime.ParseExact(arg0, arg1, arg2);
- ToLua.PushValue(L, o);
- return 1;
- }
- else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(string), typeof(System.IFormatProvider), typeof(System.Globalization.DateTimeStyles)))
- {
- string arg0 = ToLua.ToString(L, 1);
- string arg1 = ToLua.ToString(L, 2);
- System.IFormatProvider arg2 = (System.IFormatProvider)ToLua.ToObject(L, 3);
- System.Globalization.DateTimeStyles arg3 = (System.Globalization.DateTimeStyles)ToLua.ToObject(L, 4);
- System.DateTime o = System.DateTime.ParseExact(arg0, arg1, arg2, arg3);
- ToLua.PushValue(L, o);
- return 1;
- }
- else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(string[]), typeof(System.IFormatProvider), typeof(System.Globalization.DateTimeStyles)))
- {
- string arg0 = ToLua.ToString(L, 1);
- string[] arg1 = ToLua.CheckStringArray(L, 2);
- System.IFormatProvider arg2 = (System.IFormatProvider)ToLua.ToObject(L, 3);
- System.Globalization.DateTimeStyles arg3 = (System.Globalization.DateTimeStyles)ToLua.ToObject(L, 4);
- System.DateTime o = System.DateTime.ParseExact(arg0, arg1, arg2, arg3);
- ToLua.PushValue(L, o);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.ParseExact");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int Subtract(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(System.DateTime)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- System.DateTime arg0 = (System.DateTime)ToLua.ToObject(L, 2);
- System.TimeSpan o = obj.Subtract(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(System.TimeSpan)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- System.TimeSpan arg0 = (System.TimeSpan)ToLua.ToObject(L, 2);
- System.DateTime o = obj.Subtract(arg0);
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.Subtract");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToOADate(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- double o = obj.ToOADate();
- LuaDLL.lua_pushnumber(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToFileTime(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- long o = obj.ToFileTime();
- LuaDLL.tolua_pushint64(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToFileTimeUtc(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- long o = obj.ToFileTimeUtc();
- LuaDLL.tolua_pushint64(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToLocalTime(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- System.DateTime o = obj.ToLocalTime();
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToLongDateString(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- string o = obj.ToLongDateString();
- LuaDLL.lua_pushstring(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToLongTimeString(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- string o = obj.ToLongTimeString();
- LuaDLL.lua_pushstring(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToShortDateString(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- string o = obj.ToShortDateString();
- LuaDLL.lua_pushstring(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToShortTimeString(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- string o = obj.ToShortTimeString();
- LuaDLL.lua_pushstring(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToString(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- string o = obj.ToString();
- LuaDLL.lua_pushstring(L, o);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(string)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- string arg0 = ToLua.ToString(L, 2);
- string o = obj.ToString(arg0);
- LuaDLL.lua_pushstring(L, o);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(System.IFormatProvider)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- System.IFormatProvider arg0 = (System.IFormatProvider)ToLua.ToObject(L, 2);
- string o = obj.ToString(arg0);
- LuaDLL.lua_pushstring(L, o);
- return 1;
- }
- else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(string), typeof(System.IFormatProvider)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- string arg0 = ToLua.ToString(L, 2);
- System.IFormatProvider arg1 = (System.IFormatProvider)ToLua.ToObject(L, 3);
- string o = obj.ToString(arg0, arg1);
- LuaDLL.lua_pushstring(L, o);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.ToString");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int ToUniversalTime(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- System.DateTime o = obj.ToUniversalTime();
- ToLua.PushValue(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int TryParse(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string)))
- {
- string arg0 = ToLua.ToString(L, 1);
- System.DateTime arg1;
- bool o = System.DateTime.TryParse(arg0, out arg1);
- LuaDLL.lua_pushboolean(L, o);
- ToLua.PushValue(L, arg1);
- return 2;
- }
- else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(System.IFormatProvider), typeof(System.Globalization.DateTimeStyles)))
- {
- string arg0 = ToLua.ToString(L, 1);
- System.IFormatProvider arg1 = (System.IFormatProvider)ToLua.ToObject(L, 2);
- System.Globalization.DateTimeStyles arg2 = (System.Globalization.DateTimeStyles)ToLua.ToObject(L, 3);
- System.DateTime arg3;
- bool o = System.DateTime.TryParse(arg0, arg1, arg2, out arg3);
- LuaDLL.lua_pushboolean(L, o);
- ToLua.PushValue(L, arg3);
- return 2;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.TryParse");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int TryParseExact(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(string), typeof(System.IFormatProvider), typeof(System.Globalization.DateTimeStyles)))
- {
- string arg0 = ToLua.ToString(L, 1);
- string arg1 = ToLua.ToString(L, 2);
- System.IFormatProvider arg2 = (System.IFormatProvider)ToLua.ToObject(L, 3);
- System.Globalization.DateTimeStyles arg3 = (System.Globalization.DateTimeStyles)ToLua.ToObject(L, 4);
- System.DateTime arg4;
- bool o = System.DateTime.TryParseExact(arg0, arg1, arg2, arg3, out arg4);
- LuaDLL.lua_pushboolean(L, o);
- ToLua.PushValue(L, arg4);
- return 2;
- }
- else if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(string[]), typeof(System.IFormatProvider), typeof(System.Globalization.DateTimeStyles)))
- {
- string arg0 = ToLua.ToString(L, 1);
- string[] arg1 = ToLua.CheckStringArray(L, 2);
- System.IFormatProvider arg2 = (System.IFormatProvider)ToLua.ToObject(L, 3);
- System.Globalization.DateTimeStyles arg3 = (System.Globalization.DateTimeStyles)ToLua.ToObject(L, 4);
- System.DateTime arg4;
- bool o = System.DateTime.TryParseExact(arg0, arg1, arg2, arg3, out arg4);
- LuaDLL.lua_pushboolean(L, o);
- ToLua.PushValue(L, arg4);
- return 2;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.TryParseExact");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int op_Addition(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime arg0 = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- System.TimeSpan arg1 = (System.TimeSpan)ToLua.CheckObject(L, 2, typeof(System.TimeSpan));
- System.DateTime o = arg0 + arg1;
- ToLua.PushValue(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int op_Subtraction(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(System.TimeSpan)))
- {
- System.DateTime arg0 = (System.DateTime)ToLua.ToObject(L, 1);
- System.TimeSpan arg1 = (System.TimeSpan)ToLua.ToObject(L, 2);
- System.DateTime o = arg0 - arg1;
- ToLua.PushValue(L, o);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(System.DateTime)))
- {
- System.DateTime arg0 = (System.DateTime)ToLua.ToObject(L, 1);
- System.DateTime arg1 = (System.DateTime)ToLua.ToObject(L, 2);
- System.TimeSpan o = arg0 - arg1;
- ToLua.PushValue(L, o);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.op_Subtraction");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int op_Equality(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 2);
- System.DateTime arg0 = (System.DateTime)ToLua.ToObject(L, 1);
- System.DateTime arg1 = (System.DateTime)ToLua.ToObject(L, 2);
- bool o = arg0 == arg1;
- LuaDLL.lua_pushboolean(L, o);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetDateTimeFormats(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
-
- if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- string[] o = obj.GetDateTimeFormats();
- ToLua.Push(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(System.IFormatProvider)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- System.IFormatProvider arg0 = (System.IFormatProvider)ToLua.ToObject(L, 2);
- string[] o = obj.GetDateTimeFormats(arg0);
- ToLua.Push(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(char)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- char arg0 = (char)LuaDLL.lua_tonumber(L, 2);
- string[] o = obj.GetDateTimeFormats(arg0);
- ToLua.Push(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(System.DateTime), typeof(char), typeof(System.IFormatProvider)))
- {
- System.DateTime obj = (System.DateTime)ToLua.ToObject(L, 1);
- char arg0 = (char)LuaDLL.lua_tonumber(L, 2);
- System.IFormatProvider arg1 = (System.IFormatProvider)ToLua.ToObject(L, 3);
- string[] o = obj.GetDateTimeFormats(arg0, arg1);
- ToLua.Push(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to method: System.DateTime.GetDateTimeFormats");
- }
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int GetTypeCode(IntPtr L)
- {
- try
- {
- ToLua.CheckArgsCount(L, 1);
- System.DateTime obj = (System.DateTime)ToLua.CheckObject(L, 1, typeof(System.DateTime));
- System.TypeCode o = obj.GetTypeCode();
- ToLua.Push(L, o);
- ToLua.SetBack(L, 1, obj);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_MinValue(IntPtr L)
- {
- try
- {
- ToLua.PushValue(L, System.DateTime.MinValue);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_MaxValue(IntPtr L)
- {
- try
- {
- ToLua.PushValue(L, System.DateTime.MaxValue);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Date(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- System.DateTime ret = obj.Date;
- ToLua.PushValue(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Date on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Day(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- int ret = obj.Day;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Day on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_DayOfWeek(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- System.DayOfWeek ret = obj.DayOfWeek;
- ToLua.Push(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index DayOfWeek on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_DayOfYear(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- int ret = obj.DayOfYear;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index DayOfYear on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Hour(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- int ret = obj.Hour;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Hour on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Kind(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- System.DateTimeKind ret = obj.Kind;
- ToLua.Push(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Kind on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Millisecond(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- int ret = obj.Millisecond;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Millisecond on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Minute(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- int ret = obj.Minute;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Minute on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Month(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- int ret = obj.Month;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Month on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Now(IntPtr L)
- {
- try
- {
- ToLua.PushValue(L, System.DateTime.Now);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_UtcNow(IntPtr L)
- {
- try
- {
- ToLua.PushValue(L, System.DateTime.UtcNow);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Second(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- int ret = obj.Second;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Second on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Ticks(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- long ret = obj.Ticks;
- LuaDLL.tolua_pushint64(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Ticks on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_TimeOfDay(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- System.TimeSpan ret = obj.TimeOfDay;
- ToLua.PushValue(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index TimeOfDay on a nil value" : e.Message);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Today(IntPtr L)
- {
- try
- {
- ToLua.PushValue(L, System.DateTime.Today);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
-
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_Year(IntPtr L)
- {
- object o = null;
-
- try
- {
- o = ToLua.ToObject(L, 1);
- System.DateTime obj = (System.DateTime)o;
- int ret = obj.Year;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index Year on a nil value" : e.Message);
- }
- }
- }
-
|