/// <summary> /// Detach progress and completed handers to a background task. /// </summary> /// <param name="task">The task to attach progress and completed handlers to.</param> private void DetachProgressAndCompletedHandlers() { ProgressEvent -= OnProgress; CompletedEvent -= OnCompleted; }
/// <summary> /// Attach progress and completed handers to a background task. /// </summary> /// <param name="task">The task to attach progress and completed handlers to.</param> private void AttachProgressAndCompletedHandlers() { ProgressEvent += new discoverTaskProgressEventHandler(OnProgress); CompletedEvent += new discoverTaskCompletedEventHandler(OnCompleted); }