public static void SendEvent(TaskType type) { Delegate action; if (_dictEvent.TryGetValue(type, out action)) { var task = new TimerTask(); task.Action = action as Action; _taskList.Add(task); } }
public static void SendEvent <T, K>(TaskType type, T t, K k) { Delegate action; if (_dictEvent.TryGetValue(type, out action)) { var task = new TimerTask <T, K>(); task.Data = t; task.Data2 = k; task.Action = action as Action <T, K>; _taskList.Add(task); } }