Exemplo n.º 1
0
 public static void CopyFrom <T>(this T ťhis, T that, bool copyPrivate = false) where T : PrimitiveCopyable
 {
     CopyHelper.CopyProperties(that, ťhis, copyPrivate);
     CopyHelper.CopyFields(that, ťhis, copyPrivate);
 }
Exemplo n.º 2
0
 /// <summary>
 /// A primitive CopyTo implementation that scrapes public fields and properties and copies
 /// them to the target object. Will not target private fields/properties.
 /// </summary>
 /// <typeparam name="T">
 /// </typeparam>
 /// <param name="ťhis">
 /// </param>
 /// <param name="that">
 /// </param>
 public static void PrimitiveCopyTo <T>(this T ťhis, T that, bool copyPrivate = false)
 {
     CopyHelper.CopyProperties(ťhis, that, copyPrivate);
     CopyHelper.CopyFields(ťhis, that, copyPrivate);
 }