Hi fellow deepcopy developer, when I ran your library against my unit tests (I was actually looking to benchmark it against the purely reflection based approach) an issue popped up: AnyClone v1.1.6 does not deep copy value types that contain references to mutable classes. Here's the unit test:
[TestMethod]
public void Copy_DeepCopiesMutableFieldsOfValueTypes()
{
// Tuple itself is a mutable valuetype, MySingleObject is a class
var a = new Tuple<MySingleObject>(new MySingleObject());
var b = AnyClone.CloneExtensions.Clone(a);
Assert.AreNotSame(a.Item1, b.Item1); // this assert fails
Assert.AreEqual(a.Item1, b.Item1);
Assert.AreEqual(a, b);
}
In other words this will result in two copies of Tuple that share the same 'MySingleObject' instance.
Hi fellow deepcopy developer, when I ran your library against my unit tests (I was actually looking to benchmark it against the purely reflection based approach) an issue popped up: AnyClone v1.1.6 does not deep copy value types that contain references to mutable classes. Here's the unit test:
In other words this will result in two copies of Tuple that share the same 'MySingleObject' instance.