Changeset 3317 for trunk/sources/HeuristicLab.Optimization
- Timestamp:
- 04/13/10 06:41:56 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/OptimizerList.cs
r3274 r3317 33 33 public OptimizerList(int capacity) : base(capacity) { } 34 34 public OptimizerList(IEnumerable<IOptimizer> collection) : base(collection) { } 35 36 public override IDeepCloneable Clone(Cloner cloner) {37 OptimizerList clone = new OptimizerList(this.Select(x => (IOptimizer)cloner.Clone(x)));38 cloner.RegisterClonedObject(this, clone);39 return clone;40 }41 35 } 42 36 } -
trunk/sources/HeuristicLab.Optimization/3.3/Result.cs
r3226 r3317 45 45 } 46 46 47 [Storable] 47 48 private IItem value; 48 [Storable]49 49 public IItem Value { 50 50 get { return value; } … … 84 84 this.dataType = value == null ? typeof(IItem) : value.GetType(); 85 85 this.value = value; 86 if (this.value != null) this.value.ToStringChanged += new EventHandler(Value_ToStringChanged);86 Initialize(); 87 87 } 88 88 public Result(string name, string description, IItem value) … … 90 90 this.dataType = value == null ? typeof(IItem) : value.GetType(); 91 91 this.value = value; 92 if (this.value != null) this.value.ToStringChanged += new EventHandler(Value_ToStringChanged); 92 Initialize(); 93 } 94 [StorableConstructor] 95 private Result(bool deserializing) : base(deserializing) { } 96 97 [StorableHook(HookType.AfterDeserialization)] 98 private void Initialize() { 99 if (value != null) value.ToStringChanged += new EventHandler(Value_ToStringChanged); 93 100 } 94 101 95 102 public override IDeepCloneable Clone(Cloner cloner) { 96 Result clone = new Result(Name, Description, (IItem)cloner.Clone(value));103 Result clone = new Result(Name, Description, DataType); 97 104 cloner.RegisterClonedObject(this, clone); 98 clone.dataType = dataType; 105 clone.ReadOnlyView = ReadOnlyView; 106 clone.value = (IItem)cloner.Clone(value); 107 clone.Initialize(); 99 108 return clone; 100 109 } -
trunk/sources/HeuristicLab.Optimization/3.3/ResultCollection.cs
r3274 r3317 32 32 public ResultCollection(int capacity) : base(capacity) { } 33 33 public ResultCollection(IEnumerable<IResult> collection) : base(collection) { } 34 35 public override IDeepCloneable Clone(Cloner cloner) {36 ResultCollection clone = new ResultCollection(this.Select(x => (IResult)cloner.Clone(x)));37 cloner.RegisterClonedObject(this, clone);38 return clone;39 }40 34 } 41 35 } -
trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs
r3280 r3317 32 32 public RunCollection(int capacity) : base(capacity) { } 33 33 public RunCollection(IEnumerable<IRun> collection) : base(collection) { } 34 35 public override IDeepCloneable Clone(Cloner cloner) {36 RunCollection clone = new RunCollection(this.Select(x => (IRun)cloner.Clone(x)));37 cloner.RegisterClonedObject(this, clone);38 return clone;39 }40 34 } 41 35 }
Note: See TracChangeset
for help on using the changeset viewer.