/// <summary> /// Returns true if ChannelDTO instances are equal /// </summary> /// <param name="input">Instance of ChannelDTO to be compared</param> /// <returns>Boolean</returns> public bool Equals(ChannelDTO input) { if (input == null) { return(false); } return (( Uid == input.Uid || (Uid != null && Uid.Equals(input.Uid)) ) && ( Id == input.Id || (Id != null && Id.Equals(input.Id)) ) && ( ChannelTypeUID == input.ChannelTypeUID || (ChannelTypeUID != null && ChannelTypeUID.Equals(input.ChannelTypeUID)) ) && ( ItemType == input.ItemType || (ItemType != null && ItemType.Equals(input.ItemType)) ) && ( Kind == input.Kind || (Kind != null && Kind.Equals(input.Kind)) ) && ( Label == input.Label || (Label != null && Label.Equals(input.Label)) ) && ( Description == input.Description || (Description != null && Description.Equals(input.Description)) ) && ( DefaultTags == input.DefaultTags || DefaultTags != null && DefaultTags.SequenceEqual(input.DefaultTags) ) && ( Properties == input.Properties || Properties != null && Properties.SequenceEqual(input.Properties) ) && ( Configuration == input.Configuration || Configuration != null && Configuration.SequenceEqual(input.Configuration) )); }
/// <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 (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (ChannelTypeUID != null) { hashCode = hashCode * 59 + ChannelTypeUID.GetHashCode(); } if (ItemType != null) { hashCode = hashCode * 59 + ItemType.GetHashCode(); } if (Kind != null) { hashCode = hashCode * 59 + Kind.GetHashCode(); } if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (DefaultTags != null) { hashCode = hashCode * 59 + DefaultTags.GetHashCode(); } if (Properties != null) { hashCode = hashCode * 59 + Properties.GetHashCode(); } if (Configuration != null) { hashCode = hashCode * 59 + Configuration.GetHashCode(); } return(hashCode); } }