示例#1
0
 /// <summary>
 /// Removes the given taskItem from the collection of ITaskItems
 /// managed by the BasicTaskManager and disposes of the ITaskItem
 /// </summary>
 /// <param name="taskItem">
 /// To be removed from the BasicTaskManager's collection and disposed
 /// of.
 /// </param>
 /// <returns>
 /// True if the taskItem was removed from the BasicTaskManager's
 /// collection and disposed of, otherwise false.
 /// </returns>
 public bool Remove(ITaskItem taskItem)
 {
     if (tasks.Remove(taskItem))
     {
         taskItem.Dispose();
         return(true);
     }
     return(false);
 }