More work on deep cloning, have test passing for IContent

This commit is contained in:
Shannon
2014-04-15 13:52:49 +10:00
parent b7f7775b89
commit 58758e7a41
18 changed files with 156 additions and 81 deletions

View File

@@ -201,14 +201,14 @@ namespace Umbraco.Core.Models
/// Create a deep clone of this property collection
/// </summary>
/// <returns></returns>
public T DeepClone<T>() where T: IDeepCloneable
public object DeepClone()
{
var newList = new PropertyCollection();
foreach (var p in this)
{
newList.Add(p.DeepClone<Property>());
newList.Add((Property)p.DeepClone());
}
return (T)(object)newList;
return newList;
}
}
}