Changeset 2364


Ignore:
Timestamp:
11/7/2011 7:24:13 AM (3 years ago)
Author:
lowjoel
Message:

The ErasureTargetCollection? (renamed from ErasureTargetsCollection?) no longer has to set anything because the ErasureTarget? does not reference the Task any longer (not possible, as that will introduce cycles in dependencies)

Location:
branches/eraser6/pluginsRewrite
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/eraser6/pluginsRewrite/Eraser.Manager/ErasureTargetCollection.cs

    r2357 r2364  
    3939    /// </summary> 
    4040    [Serializable] 
    41     public class ErasureTargetsCollection : IList<ErasureTarget>, ISerializable 
     41    public class ErasureTargetCollection : IList<ErasureTarget>, ISerializable 
    4242    { 
    4343        #region Constructors 
    44         internal ErasureTargetsCollection(Task owner) 
     44        internal ErasureTargetCollection(Task owner) 
    4545        { 
    4646            this.list = new List<ErasureTarget>(); 
     
    4848        } 
    4949 
    50         internal ErasureTargetsCollection(Task owner, int capacity) 
     50        internal ErasureTargetCollection(Task owner, int capacity) 
    5151            : this(owner) 
    5252        { 
     
    5454        } 
    5555 
    56         internal ErasureTargetsCollection(Task owner, IEnumerable<ErasureTarget> targets) 
     56        internal ErasureTargetCollection(Task owner, IEnumerable<ErasureTarget> targets) 
    5757            : this(owner) 
    5858        { 
     
    6262 
    6363        #region Serialization Code 
    64         protected ErasureTargetsCollection(SerializationInfo info, StreamingContext context) 
     64        protected ErasureTargetCollection(SerializationInfo info, StreamingContext context) 
    6565        { 
    6666            list = (List<ErasureTarget>)info.GetValue("list", typeof(List<ErasureTarget>)); 
     
    9191        public void Add(ErasureTarget item) 
    9292        { 
    93             item.Task = owner; 
    94             item.OnProgressChanged = owner.OnProgressChanged; 
    9593            list.Add(item); 
    9694        } 
  • branches/eraser6/pluginsRewrite/Eraser.Manager/Task.cs

    r2275 r2364  
    4444            Name = (string)info.GetValue("Name", typeof(string)); 
    4545            Executor = context.Context as Executor; 
    46             Targets = (ErasureTargetsCollection)info.GetValue("Targets", typeof(ErasureTargetsCollection)); 
     46            Targets = (ErasureTargetCollection)info.GetValue("Targets", typeof(ErasureTargetCollection)); 
    4747            Targets.Owner = this; 
    4848            Log = (List<LogSink>)info.GetValue("Log", typeof(List<LogSink>)); 
     
    7979        { 
    8080            Name = string.Empty; 
    81             Targets = new ErasureTargetsCollection(this); 
     81            Targets = new ErasureTargetCollection(this); 
    8282            Schedule = Schedule.RunNow; 
    8383            Canceled = false; 
     
    170170        /// The set of data to erase when this task is executed. 
    171171        /// </summary> 
    172         public ErasureTargetsCollection Targets { get; private set; } 
     172        public ErasureTargetCollection Targets { get; private set; } 
    173173 
    174174        /// <summary> 
  • branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/ErasureTarget.cs

    r2358 r2364  
    138138 
    139139        /// <summary> 
    140         /// The progress of this target. 
    141         /// </summary> 
    142         public ProgressManagerBase Progress 
    143         { 
    144             get; 
    145             protected set; 
    146         } 
    147  
    148         /// <summary> 
    149140        /// The Progress Changed event handler of the owning task. 
    150141        /// </summary> 
Note: See TracChangeset for help on using the changeset viewer.