public override bool Equals(object other) { DataContractPairKey otherKey = other as DataContractPairKey; if (otherKey == null) { return(false); } return((otherKey._object1 == _object1 && otherKey._object2 == _object2) || (otherKey._object1 == _object2 && otherKey._object2 == _object1)); }
internal bool IsEqualOrChecked(object other, Dictionary<DataContractPairKey, object> checkedContracts) { if (this == other) { return true; } if (checkedContracts != null) { DataContractPairKey key = new DataContractPairKey(this, other); if (checkedContracts.ContainsKey(key)) { return true; } checkedContracts.Add(key, null); } return false; }