You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is Amazing!!! I keep evangelizing it for years.
Unless I am doing something wrong, I can't seem to successfully ignore a read-only property.
We have a graph as follows:
CaseDto (primary object to compare)
It has a public property "Client" of class ClientDto.
ClientDto has a readonly property (below) titled "AddressParts", this property appears as a Difference even though the property is mentioned in .Ignore(client => client.AddressParts) in configuration of type ClientDto (other ignored properties are ignored perfectly):
public class ClientDto
{
..
public string[] AddressParts => AddressStringHelper.ConstructTwoLineAddressParts(
AccountLocation?.AddressLine1,
AccountLocation?.AddressLine2,
AccountLocation?.City,
AccountLocation?.StateProvince,
AccountLocation?.ZipCode
);
}
Example of the Difference instance (if serialized to JSON):
{
"$type": "AutoCompare.Difference, AutoCompare",
"Name": "Client.AddressParts",
"OldValue": {
"$type": "System.String[], mscorlib",
"$values": [ "Street address", "SÃO PAULO, BRAZIL N/A" ]
},
"NewValue": {
"$type": "System.String[], mscorlib",
"$values": [ "Street address", "SÃO PAULO, BRAZIL N/A" ]
}
}
The text was updated successfully, but these errors were encountered:
This library is Amazing!!! I keep evangelizing it for years.
Unless I am doing something wrong, I can't seem to successfully ignore a read-only property.
We have a graph as follows:
CaseDto (primary object to compare)
It has a public property "Client" of class ClientDto.
ClientDto has a readonly property (below) titled "AddressParts", this property appears as a Difference even though the property is mentioned in .Ignore(client => client.AddressParts) in configuration of type ClientDto (other ignored properties are ignored perfectly):
public class ClientDto
{
..
public string[] AddressParts => AddressStringHelper.ConstructTwoLineAddressParts(
AccountLocation?.AddressLine1,
AccountLocation?.AddressLine2,
AccountLocation?.City,
AccountLocation?.StateProvince,
AccountLocation?.ZipCode
);
}
Example of the Difference instance (if serialized to JSON):
{
"$type": "AutoCompare.Difference, AutoCompare",
"Name": "Client.AddressParts",
"OldValue": {
"$type": "System.String[], mscorlib",
"$values": [ "Street address", "SÃO PAULO, BRAZIL N/A" ]
},
"NewValue": {
"$type": "System.String[], mscorlib",
"$values": [ "Street address", "SÃO PAULO, BRAZIL N/A" ]
}
}
The text was updated successfully, but these errors were encountered: