Пример #1
0
        private void HandleTaskStop(Object obj, TaskStoppedEventArgs e)
        {
            StartTasksAsync();
            var task = obj as UserTaskBase;

            if (task != null)
            {
                task.Stop -= this.HandleTaskStop;
            }
        }
Пример #2
0
        protected virtual void OnTaskStopped(TaskStoppedEventArgs e)
        {
            var delegates = Stop?.GetInvocationList();

            if (delegates == null)
            {
                return;
            }
            foreach (EventHandler <TaskStoppedEventArgs> d in delegates)
            {
                d?.Invoke(this, e);
            }
        }