/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns>A hash code for the current <see cref="T:System.Object" />.</returns> public override int GetHashCode() { return((Architecture.GetHashCode()) ^ (string.IsNullOrWhiteSpace(CompatibleIds) ? 0 : CompatibleIds.GetHashCode()) ^ (string.IsNullOrWhiteSpace(ExcludeIds) ? 0 : ExcludeIds.GetHashCode()) ^ (string.IsNullOrWhiteSpace(HardwareDescription) ? 0 : HardwareDescription.GetHashCode()) ^ (string.IsNullOrWhiteSpace(HardwareId) ? 0 : HardwareId.GetHashCode()) ^ (string.IsNullOrWhiteSpace(ManufacturerName) ? 0 : ManufacturerName.GetHashCode()) ^ (string.IsNullOrWhiteSpace(ServerName) ? 0 : ServerName.GetHashCode())); }
/// <summary> /// Gets a hash code based on the Host and HardwareId properties</summary> /// <returns>Hash code based on the Host and HardwareId properties</returns> public override int GetHashCode() { int hash = 0; if (Host != null) { hash ^= Host.GetHashCode(); } if (HardwareId != null) { hash ^= HardwareId.GetHashCode(); } return(hash); }