Changeset 4722 for trunk/sources/HeuristicLab.Common/3.3/Cloner.cs
- 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.Common/3.3/Cloner.cs
r4068 r4722 50 50 } 51 51 /// <summary> 52 /// Creates a deep clone of a given deeply cloneable object. 53 /// </summary> 54 /// <param name="item">The object which should be cloned.</param> 55 /// <returns>A clone of the given object.</returns> 56 public T Clone<T>(T obj) where T : class, IDeepCloneable { 57 if (obj == null) return null; 58 IDeepCloneable clone; 59 if (mapping.TryGetValue(obj, out clone)) 60 return (T)clone; 61 else 62 return (T)obj.Clone(this); 63 } 64 /// <summary> 52 65 /// Registers a new clone for a given deeply cloneable object. 53 66 /// </summary>
Note: See TracChangeset
for help on using the changeset viewer.