public void TestStructWithClassCloning() { var obj = new TestNestedStruct_IS_CLASS { StructProp = new TestNestedClass_IS_STRUCT { ClassProp = new TestNestedStruct_IS_CLASS { StructProp = new TestNestedClass_IS_STRUCT() } } }; var cloner = new IlCloner(); var clonerStruct = cloner.CreateClonerDelegate(obj.StructProp); var clonedStruct = clonerStruct(obj.StructProp); }
public void TestClassWithStructCloning() { var obj = new TestNestedStruct_IS_CLASS { StructProp = new TestNestedClass_IS_STRUCT { ClassProp = new TestNestedStruct_IS_CLASS { StructProp = new TestNestedClass_IS_STRUCT() } } }; var cloner = new IlCloner(); var clonerClass = cloner.CreateClonerDelegate(obj); var clonedClass = clonerClass(obj); }