public static void DeepCopyTo <T>(this T baseObj, T targetObj, CloneProviderContext context = null) { CloneProvider provider = new CloneProvider(context); provider.CopyObject(baseObj, targetObj); }
public static T DeepClone <T>(this T baseObj, CloneProviderContext context = null) { CloneProvider provider = new CloneProvider(context); return((T)provider.CloneObject(baseObj)); }