in DTDLValidator/DTDLValidator/Interactive/CompareCommand.cs [210:226]
public int GetHashCode(DTRelationshipInfo pi)
{
//Check whether the object is null
if (Object.ReferenceEquals(pi, null)) return 0;
//Get hash code for the Name field if it is not null.
int hashPIName = pi.Name == null ? 0 : pi.Name.GetHashCode();
//Get hash code for the Code field.
if (pi.Target == null)
return hashPIName;
int hashPITarget = pi.Target.GetHashCode();
//Calculate the hash code for the product.
return hashPIName ^ hashPITarget;
}