Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }