static int QPYX_Kill_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 2); SmartTimer QPYX_obj_YXQP = (SmartTimer)ToLua.CheckObject <SmartTimer>(L_YXQP, 1); int QPYX_arg0_YXQP = (int)LuaDLL.luaL_checknumber(L_YXQP, 2); QPYX_obj_YXQP.Kill(QPYX_arg0_YXQP); return(0); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int Kill(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); SmartTimer obj = (SmartTimer)ToLua.CheckObject <SmartTimer>(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.Kill(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int QPYX_SingleSet_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 2); SmartTimer QPYX_obj_YXQP = (SmartTimer)ToLua.CheckObject <SmartTimer>(L_YXQP, 1); TimeEvent QPYX_arg0_YXQP = (TimeEvent)ToLua.CheckObject <TimeEvent>(L_YXQP, 2); TimeEvent QPYX_o_YXQP = QPYX_obj_YXQP.SingleSet(QPYX_arg0_YXQP); ToLua.PushObject(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int SingleSet(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); SmartTimer obj = (SmartTimer)ToLua.CheckObject <SmartTimer>(L, 1); TimeEvent arg0 = (TimeEvent)ToLua.CheckObject <TimeEvent>(L, 2); TimeEvent o = obj.SingleSet(arg0); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_serverTimeDiff(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SmartTimer obj = (SmartTimer)o; long arg0 = LuaDLL.tolua_checkint64(L, 2); obj.serverTimeDiff = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index serverTimeDiff on a nil value")); } }
static int get_serverTimeDiff(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SmartTimer obj = (SmartTimer)o; long ret = obj.serverTimeDiff; LuaDLL.tolua_pushint64(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index serverTimeDiff on a nil value")); } }
static int QPYX_Subscribe_YXQP(IntPtr L_YXQP) { try { ToLua.CheckArgsCount(L_YXQP, 4); SmartTimer QPYX_obj_YXQP = (SmartTimer)ToLua.CheckObject <SmartTimer>(L_YXQP, 1); double QPYX_arg0_YXQP = (double)LuaDLL.luaL_checknumber(L_YXQP, 2); bool QPYX_arg1_YXQP = LuaDLL.luaL_checkboolean(L_YXQP, 3); int QPYX_arg2_YXQP = (int)LuaDLL.luaL_checknumber(L_YXQP, 4); TimeEvent QPYX_o_YXQP = QPYX_obj_YXQP.Subscribe(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP); ToLua.PushObject(L_YXQP, QPYX_o_YXQP); return(1); } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
static int Subscribe(IntPtr L) { try { ToLua.CheckArgsCount(L, 4); SmartTimer obj = (SmartTimer)ToLua.CheckObject <SmartTimer>(L, 1); double arg0 = (double)LuaDLL.luaL_checknumber(L, 2); bool arg1 = LuaDLL.luaL_checkboolean(L, 3); int arg2 = (int)LuaDLL.luaL_checknumber(L, 4); TimeEvent o = obj.Subscribe(arg0, arg1, arg2); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// Perform shutdown duties associated with this persistence service. /// <remarks> /// This implementation disposes the internal <see cref="SmartTimer" /> /// responsible for loading expired workflows into memory. /// </remarks> /// </summary> protected override void Stop() { TraceHelper.Trace(); try { base.Stop(); lock (this.timerLock) { if (this.smartTimer != null) { this.smartTimer.Dispose(); this.smartTimer = null; } } } catch (Exception e) { string errorMessage = RM.Get_Error_PersistenceServiceException(e.ToString()); TraceHelper.Trace(errorMessage); PersistenceException persistenceException = new PersistenceException(errorMessage, e); base.RaiseServicesExceptionNotHandledEvent( persistenceException, Guid.Empty); throw persistenceException; } }
/// <summary> /// Kick-off the timer to check for workflows with expired timers, /// and recover running workflow instances. /// </summary> protected override void OnStarted() { TraceHelper.Trace(); try { base.OnStarted(); if (this.loadInterval > TimeSpan.Zero) { lock (this.timerLock) { this.smartTimer = new SmartTimer(loadWorkflowsWithExpiredTimers, null, this.loadInterval, this.loadInterval); } } recoverRunningWorkflows(); } catch (Exception e) { string errorMessage = RM.Get_Error_PersistenceServiceException(e.ToString()); TraceHelper.Trace(errorMessage); PersistenceException persistenceException = new PersistenceException(errorMessage, e); base.RaiseServicesExceptionNotHandledEvent( persistenceException, Guid.Empty); throw persistenceException; } }
///<summary> /// Clean-up the timers used by the persistence service. ///</summary> ///<filterpriority>2</filterpriority> protected virtual void Dispose(bool disposing) { if (disposing) { lock (this.timerLock) { if (this.smartTimer != null) { this.smartTimer.Dispose(); this.smartTimer = null; } } } }
void Awake() { _instance = this; }
static int QPYX_get_serverTimeDiff_YXQP(IntPtr L_YXQP) { object QPYX_o_YXQP = null; try { QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1); SmartTimer QPYX_obj_YXQP = (SmartTimer)QPYX_o_YXQP; long QPYX_ret_YXQP = QPYX_obj_YXQP.serverTimeDiff; LuaDLL.tolua_pushint64(L_YXQP, QPYX_ret_YXQP); return(1); } catch (Exception QPYX_e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index serverTimeDiff on a nil value")); } }