예제 #1
0
 private void RoundtripTypeWithColor(RuntimeTypeModel model)
 {
     var orig = new TypeWithColor
     {
         Color = new Color { A = 1, R = 2, G = 3, B = 4 }
     };
     var clone = (TypeWithColor)model.DeepClone(orig);
     Assert.AreEqual(1, clone.Color.A);
     Assert.AreEqual(2, clone.Color.R);
     Assert.AreEqual(3, clone.Color.G);
     Assert.AreEqual(4, clone.Color.B);
 }
예제 #2
0
 public static TData DeepClone <TData>(TData data)
 {
     return((TData)model.DeepClone(data));
 }