- Timestamp:
- 10/29/10 17:38:42 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Core/3.3/Collections/ScopeList.cs
r3431 r4668 29 29 [Item("ScopeList", "Represents a list of scopes.")] 30 30 public sealed class ScopeList : ItemList<IScope> { 31 [StorableConstructor] 32 private ScopeList(bool deserializing) : base(deserializing) { } 33 private ScopeList(ScopeList original, Cloner cloner) 34 : base(original, cloner) { 35 list = new List<IScope>(original.Select(x => cloner.Clone(x))); 36 } 31 37 public ScopeList() : base() { } 32 38 public ScopeList(int capacity) : base(capacity) { } 33 39 public ScopeList(IEnumerable<IScope> collection) : base(collection) { } 34 [StorableConstructor]35 private ScopeList(bool deserializing) : base(deserializing) { }36 40 37 41 public override IDeepCloneable Clone(Cloner cloner) { 38 ScopeList clone = new ScopeList(); 39 cloner.RegisterClonedObject(this, clone); 40 clone.list = new List<IScope>(this.Select(x => (IScope)cloner.Clone(x))); 41 return clone; 42 return new ScopeList(this, cloner); 42 43 } 43 44 }
Note: See TracChangeset
for help on using the changeset viewer.