public override int GetHashCode() { unchecked { var hashCode = (MessageType != null ? MessageType.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CommunicationType.GetHashCode(); hashCode = (hashCode * 397) ^ RouteType.GetHashCode(); hashCode = (hashCode * 397) ^ (int)Priority; hashCode = (hashCode * 397) ^ Exclusive.GetHashCode(); hashCode = (hashCode * 397) ^ (LocalContext != null ? LocalContext.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (RemoteBoundedContext != null ? RemoteBoundedContext.GetHashCode() : 0); hashCode = m_Hints.Keys.OrderBy(k => k).Aggregate(hashCode, (h, key) => (h * 397) ^ key.GetHashCode()); hashCode = m_Hints.Values.OrderBy(v => v).Aggregate(hashCode, (h, value) => (h * 397) ^ (value != null?value.GetHashCode():0)); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (BluetoothAddress.Length != 0) { hash ^= BluetoothAddress.GetHashCode(); } if (SystemTime != 0L) { hash ^= SystemTime.GetHashCode(); } if (CommunicationType != global::com.shimmerresearch.datastructure.ObjectCluster2.Types.CommunicationType.BT) { hash ^= CommunicationType.GetHashCode(); } hash ^= DataMap.GetHashCode(); return(hash); }