//this source code was auto-generated by tolua#, do not modify it using System; using LuaInterface; public class DateUtilsWrap { public static void Register(LuaState L) { L.BeginClass(typeof(DateUtils), typeof(System.Object)); L.RegFunction("Millis2String", Millis2String); L.RegFunction("String2Millis", String2Millis); L.RegFunction("GetDateInfo", GetDateInfo); L.RegFunction("DateTimeFormat", DateTimeFormat); L.RegFunction("DateTimeCompareTo", DateTimeCompareTo); L.RegFunction("GetTimeDoubleInfo", GetTimeDoubleInfo); L.RegFunction("GetTimeIntInfo", GetTimeIntInfo); L.RegFunction("IsLeapYear", IsLeapYear); L.RegFunction("GetWeekOfMonth", GetWeekOfMonth); L.RegFunction("getChineseZodiac", getChineseZodiac); L.RegFunction("getZodiac", getZodiac); L.RegFunction("GetTimeFormat", GetTimeFormat); L.RegFunction("GetTimeFormatV2", GetTimeFormatV2); L.RegFunction("GetDateTime", GetDateTime); L.RegFunction("New", _CreateDateUtils); L.RegFunction("__tostring", ToLua.op_ToString); L.RegVar("DEFAULT_PATTERN", get_DEFAULT_PATTERN, null); L.EndClass(); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _CreateDateUtils(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { DateUtils obj = new DateUtils(); ToLua.PushObject(L, obj); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: DateUtils.New"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int Millis2String(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { long arg0 = LuaDLL.tolua_checkint64(L, 1); string o = DateUtils.Millis2String(arg0); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 2) { long arg0 = LuaDLL.tolua_checkint64(L, 1); string arg1 = ToLua.CheckString(L, 2); string o = DateUtils.Millis2String(arg0, arg1); LuaDLL.lua_pushstring(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: DateUtils.Millis2String"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int String2Millis(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { string arg0 = ToLua.CheckString(L, 1); long o = DateUtils.String2Millis(arg0); LuaDLL.tolua_pushint64(L, o); return 1; } else if (count == 2) { string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); long o = DateUtils.String2Millis(arg0, arg1); LuaDLL.tolua_pushint64(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: DateUtils.String2Millis"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetDateInfo(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); string o = DateUtils.GetDateInfo(arg0, arg1); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 3) { string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); bool arg2 = LuaDLL.luaL_checkboolean(L, 3); string o = DateUtils.GetDateInfo(arg0, arg1, arg2); LuaDLL.lua_pushstring(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: DateUtils.GetDateInfo"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int DateTimeFormat(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3 && TypeChecker.CheckTypes(L, 2)) { DateUtils obj = (DateUtils)ToLua.CheckObject(L, 1); string arg0 = ToLua.ToString(L, 2); string arg1 = ToLua.ToString(L, 3); string o = obj.DateTimeFormat(arg0, arg1); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 3 && TypeChecker.CheckTypes(L, 2)) { DateUtils obj = (DateUtils)ToLua.CheckObject(L, 1); long arg0 = LuaDLL.tolua_toint64(L, 2); string arg1 = ToLua.ToString(L, 3); string o = obj.DateTimeFormat(arg0, arg1); LuaDLL.lua_pushstring(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: DateUtils.DateTimeFormat"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int DateTimeCompareTo(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); DateUtils obj = (DateUtils)ToLua.CheckObject(L, 1); string arg0 = ToLua.CheckString(L, 2); string arg1 = ToLua.CheckString(L, 3); int o = obj.DateTimeCompareTo(arg0, arg1); LuaDLL.lua_pushinteger(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetTimeDoubleInfo(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3) { string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); string arg2 = ToLua.CheckString(L, 3); double o = DateUtils.GetTimeDoubleInfo(arg0, arg1, arg2); LuaDLL.lua_pushnumber(L, o); return 1; } else if (count == 4) { string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); string arg2 = ToLua.CheckString(L, 3); bool arg3 = LuaDLL.luaL_checkboolean(L, 4); double o = DateUtils.GetTimeDoubleInfo(arg0, arg1, arg2, arg3); LuaDLL.lua_pushnumber(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: DateUtils.GetTimeDoubleInfo"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetTimeIntInfo(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3) { string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); string arg2 = ToLua.CheckString(L, 3); long o = DateUtils.GetTimeIntInfo(arg0, arg1, arg2); LuaDLL.tolua_pushint64(L, o); return 1; } else if (count == 4) { string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); string arg2 = ToLua.CheckString(L, 3); bool arg3 = LuaDLL.luaL_checkboolean(L, 4); long o = DateUtils.GetTimeIntInfo(arg0, arg1, arg2, arg3); LuaDLL.tolua_pushint64(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: DateUtils.GetTimeIntInfo"); } } 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 = DateUtils.IsLeapYear(arg0); LuaDLL.lua_pushboolean(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetWeekOfMonth(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); DateUtils obj = (DateUtils)ToLua.CheckObject(L, 1); string arg0 = ToLua.CheckString(L, 2); int o = obj.GetWeekOfMonth(arg0); LuaDLL.lua_pushinteger(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int getChineseZodiac(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { string arg0 = ToLua.CheckString(L, 1); string o = DateUtils.getChineseZodiac(arg0); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 2) { string arg0 = ToLua.CheckString(L, 1); string arg1 = ToLua.CheckString(L, 2); string o = DateUtils.getChineseZodiac(arg0, arg1); LuaDLL.lua_pushstring(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: DateUtils.getChineseZodiac"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int getZodiac(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { long arg0 = LuaDLL.tolua_checkint64(L, 1); string o = DateUtils.getZodiac(arg0); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 2 && TypeChecker.CheckTypes(L, 1)) { int arg0 = (int)LuaDLL.lua_tonumber(L, 1); int arg1 = (int)LuaDLL.lua_tonumber(L, 2); string o = DateUtils.getZodiac(arg0, arg1); LuaDLL.lua_pushstring(L, o); return 1; } else if (count == 2 && TypeChecker.CheckTypes(L, 1)) { string arg0 = ToLua.ToString(L, 1); string arg1 = ToLua.ToString(L, 2); string o = DateUtils.getZodiac(arg0, arg1); LuaDLL.lua_pushstring(L, o); return 1; } else { return LuaDLL.luaL_throw(L, "invalid arguments to method: DateUtils.getZodiac"); } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetTimeFormat(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); string o = DateUtils.GetTimeFormat(arg0); LuaDLL.lua_pushstring(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetTimeFormatV2(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); string o = DateUtils.GetTimeFormatV2(arg0); LuaDLL.lua_pushstring(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int GetDateTime(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); string o = DateUtils.GetDateTime(arg0); LuaDLL.lua_pushstring(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int get_DEFAULT_PATTERN(IntPtr L) { try { LuaDLL.lua_pushstring(L, DateUtils.DEFAULT_PATTERN); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } } }