Ignore:
Timestamp:
2/8/2010 6:44:59 AM (2 years ago)
Author:
lowjoel
Message:

Removed the TaskProcessing? and TaskProcessed? events in Executor which duplicate the TaskStarted? and TaskFinished? events in Task. The TaskEventArgs? class can't disappear just yet as the TaskAdded? and TaskDeleted? events still need them (the sender is not the task, it's the executor) Addresses #275: Code Review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/CodeReview/Eraser.Manager/Task.cs

    r1745 r1765  
    226226        /// The task has been edited. 
    227227        /// </summary> 
    228         public EventHandler<TaskEventArgs> TaskEdited { get; set; } 
     228        public EventHandler TaskEdited { get; set; } 
    229229 
    230230        /// <summary> 
    231231        /// The start of the execution of a task. 
    232232        /// </summary> 
    233         public EventHandler<TaskEventArgs> TaskStarted { get; set; } 
     233        public EventHandler TaskStarted { get; set; } 
    234234 
    235235        /// <summary> 
     
    241241        /// The completion of the execution of a task. 
    242242        /// </summary> 
    243         public EventHandler<TaskEventArgs> TaskFinished { get; set; } 
     243        public EventHandler TaskFinished { get; set; } 
    244244 
    245245        /// <summary> 
     
    249249        { 
    250250            if (TaskEdited != null) 
    251                 TaskEdited(this, new TaskEventArgs(this)); 
     251                TaskEdited(this, EventArgs.Empty); 
    252252        } 
    253253 
     
    255255        /// Broadcasts the task execution start event. 
    256256        /// </summary> 
    257         /// <param name="e"></param> 
    258         internal void OnTaskStarted(TaskEventArgs e) 
     257        internal void OnTaskStarted() 
    259258        { 
    260259            if (TaskStarted != null) 
    261                 TaskStarted(this, e); 
     260                TaskStarted(this, EventArgs.Empty); 
    262261            Executing = true; 
    263262            Progress = new SteppedProgressManager(); 
     
    294293        /// Broadcasts the task execution completion event. 
    295294        /// </summary> 
    296         /// <param name="e"></param> 
    297         internal void OnTaskFinished(TaskEventArgs e) 
     295        internal void OnTaskFinished() 
    298296        { 
    299297            if (TaskFinished != null) 
    300                 TaskFinished(this, e); 
     298                TaskFinished(this, EventArgs.Empty); 
    301299            Executing = false; 
    302300            Progress = null; 
Note: See TracChangeset for help on using the changeset viewer.