Ignore:
Timestamp:
05/04/10 03:04:18 (4 years ago)
Author:
lowjoel
Message:

Fixed the null Progress property upon the completion of the FileSystemObjectErasureTarget?.Execute function. The Progress property is now managed by the derived class itself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.DefaultPlugins/ErasureTargets/FileSystemObjectErasureTarget.cs

    r2039 r2045  
    179179        } 
    180180 
    181         public override void Execute() 
     181        /// <remarks>The <see cref="Progress"/> property must be defined prior 
     182        /// to the execution of this function.</remarks> 
     183        public virtual void Execute() 
    182184        { 
    183185            //Retrieve the list of files to erase. 
     
    190192 
    191193            //Set the event's current target status. 
    192             SteppedProgressManager progress = new SteppedProgressManager(); 
    193             Progress = progress; 
    194             Task.Progress.Steps.Add(new SteppedProgressManagerStep(progress, 1.0f / Task.Targets.Count)); 
     194            if (Progress == null) 
     195                throw new InvalidOperationException("The Progress property must not be null."); 
     196            Task.Progress.Steps.Add(new SteppedProgressManagerStep(Progress, 1.0f / Task.Targets.Count)); 
    195197 
    196198            //Iterate over every path, and erase the path. 
Note: See TracChangeset for help on using the changeset viewer.