Skip to content

CopyMatchingProperties Method ​

Definition ​

  • Namespace: JASE
  • Assembly: JASE.ReflectionTools.dll

Overloads ​

NameDescription
void CopyMatchingProperties(object from, object to, bool copyNonPublic = null)Copies all properties that match by name from one object to another.
void CopyMatchingProperties(object from, object to, out string changes, bool copyNonPublic = null, string template = null)Copies all properties that match by name from one object to another.
void CopyMatchingProperties(object from, object to, out List<string> changes, bool copyNonPublic = null, string template = null, bool ignoreNullOrEmptyGuid = null, bool useDateTimeStringCompare = null, bool requireExactTypeMatch = null)Copies all properties that match by name from one object to another.

void CopyMatchingProperties(object from, object to, bool copyNonPublic = null) ​

csharp
void CopyMatchingProperties(object from, object to, bool copyNonPublic = null)

Copies all properties that match by name from one object to another.

void CopyMatchingProperties(object from, object to, out List<string> changes, bool copyNonPublic = null, string template = null, bool ignoreNullOrEmptyGuid = null, bool useDateTimeStringCompare = null, bool requireExactTypeMatch = null) ​

csharp
void CopyMatchingProperties(object from, object to, out List<string> changes, bool copyNonPublic = null, string template = null, bool ignoreNullOrEmptyGuid = null, bool useDateTimeStringCompare = null, bool requireExactTypeMatch = null)

Copies all properties that match by name from one object to another.

Parameters ​

NameDescription
changesList of changes applied
copyNonPublicShould non-public properties by copied?
fromSource object
ignoreNullOrEmptyGuidOptional boolean for Guid.Empty handling (default: true)
templateOptional template for change tracking, valid parameter values are {property}, {previous}, and
toDestination object
useDateTimeStringCompareDateTime ToString equality will count as a match when true

void CopyMatchingProperties(object from, object to, out string changes, bool copyNonPublic = null, string template = null) ​

csharp
void CopyMatchingProperties(object from, object to, out string changes, bool copyNonPublic = null, string template = null)

Copies all properties that match by name from one object to another.