Changeset 3286 for trunk/sources/HeuristicLab.Core/3.3
- Timestamp:
- 04/08/10 02:21:50 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Core/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/ItemArray.cs
r3017 r3286 55 55 56 56 public virtual IDeepCloneable Clone(Cloner cloner) { 57 ItemArray<T> clone = (ItemArray<T>)Activator.CreateInstance(this.GetType() , this.Select(x => (T)cloner.Clone(x)));57 ItemArray<T> clone = (ItemArray<T>)Activator.CreateInstance(this.GetType()); 58 58 cloner.RegisterClonedObject(this, clone); 59 clone.array = this.Select(x => (T)cloner.Clone(x)).ToArray(); 59 60 return clone; 60 61 } -
trunk/sources/HeuristicLab.Core/3.3/ItemCollection.cs
r3017 r3286 51 51 52 52 public virtual IDeepCloneable Clone(Cloner cloner) { 53 ItemCollection<T> clone = (ItemCollection<T>)Activator.CreateInstance(this.GetType() , this.Select(x => (T)cloner.Clone(x)));53 ItemCollection<T> clone = (ItemCollection<T>)Activator.CreateInstance(this.GetType()); 54 54 cloner.RegisterClonedObject(this, clone); 55 clone.list = new List<T>(this.Select(x => (T)cloner.Clone(x))); 55 56 return clone; 56 57 } -
trunk/sources/HeuristicLab.Core/3.3/ItemList.cs
r3017 r3286 55 55 56 56 public virtual IDeepCloneable Clone(Cloner cloner) { 57 ItemList<T> clone = (ItemList<T>)Activator.CreateInstance(this.GetType() , this.Select(x => (T)cloner.Clone(x)));57 ItemList<T> clone = (ItemList<T>)Activator.CreateInstance(this.GetType()); 58 58 cloner.RegisterClonedObject(this, clone); 59 clone.list = new List<T>(this.Select(x => (T)cloner.Clone(x))); 59 60 return clone; 60 61 } -
trunk/sources/HeuristicLab.Core/3.3/ItemSet.cs
r3017 r3286 54 54 55 55 public virtual IDeepCloneable Clone(Cloner cloner) { 56 ItemSet<T> clone = (ItemSet<T>)Activator.CreateInstance(this.GetType() , this.Select(x => (T)cloner.Clone(x)));56 ItemSet<T> clone = (ItemSet<T>)Activator.CreateInstance(this.GetType()); 57 57 cloner.RegisterClonedObject(this, clone); 58 clone.set = new HashSet<T>(this.Select(x => (T)cloner.Clone(x))); 58 59 return clone; 59 60 } -
trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs
r3017 r3286 58 58 } 59 59 public virtual IDeepCloneable Clone(Cloner cloner) { 60 NamedItemCollection<T> clone = (NamedItemCollection<T>)Activator.CreateInstance(this.GetType() , this.Select(x => (T)cloner.Clone(x)));60 NamedItemCollection<T> clone = (NamedItemCollection<T>)Activator.CreateInstance(this.GetType()); 61 61 cloner.RegisterClonedObject(this, clone); 62 foreach (string key in dict.Keys) 63 clone.dict.Add(key, (T)cloner.Clone(dict[key])); 62 64 return clone; 63 65 }
Note: See TracChangeset
for help on using the changeset viewer.