- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Core/3.3/Collections/ScopeList.cs
r3431 r4722 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.