public string AddJob(int repeatCount, int interval, IDictionary <string, object> parameters) { ILazynetTimer timer = new LazynetQuartz(); var task = timer.Create <IJob>(repeatCount, interval, parameters); this.TimerDict.Add(task.Result, timer); return(task.Result); }
public string AddJob(int repeatCount, int interval, Func <LuaTable, int> call, LuaTable parameters) { string jsonString = parameters.ToJson(); var luaParameter = LuaTable.FromJson(jsonString); var dict = new Dictionary <string, object>() { { "Callback", call }, { "Parameters", luaParameter } }; ILazynetTimer timer = new LazynetQuartz(); var task = timer.Create <LazynetLuaJob>(repeatCount, interval, dict); this.TimerDict.Add(task.Result, timer); return(task.Result); }