/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (UID != null) { hashCode = hashCode * 59 + UID.GetHashCode(); } if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (Category != null) { hashCode = hashCode * 59 + Category.GetHashCode(); } if (Listed != null) { hashCode = hashCode * 59 + Listed.GetHashCode(); } if (SupportedBridgeTypeUIDs != null) { hashCode = hashCode * 59 + SupportedBridgeTypeUIDs.GetHashCode(); } if (Bridge != null) { hashCode = hashCode * 59 + Bridge.GetHashCode(); } if (Channels != null) { hashCode = hashCode * 59 + Channels.GetHashCode(); } if (ChannelGroups != null) { hashCode = hashCode * 59 + ChannelGroups.GetHashCode(); } if (ConfigParameters != null) { hashCode = hashCode * 59 + ConfigParameters.GetHashCode(); } if (ParameterGroups != null) { hashCode = hashCode * 59 + ParameterGroups.GetHashCode(); } if (Properties != null) { hashCode = hashCode * 59 + Properties.GetHashCode(); } if (ExtensibleChannelTypeIds != null) { hashCode = hashCode * 59 + ExtensibleChannelTypeIds.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Uid != null?Uid.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Listed.GetHashCode(); hashCode = (hashCode * 397) ^ (SupportedBridgeTypeUiDs != null ? SupportedBridgeTypeUiDs.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Bridge.GetHashCode(); hashCode = (hashCode * 397) ^ (Channels != null ? Channels.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ChannelGroups != null ? ChannelGroups.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ConfigParameters != null ? ConfigParameters.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ParameterGroups != null ? ParameterGroups.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Properties != null ? Properties.GetHashCode() : 0); return(hashCode); } }