/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Class != null) { hashCode = hashCode * 59 + Class.GetHashCode(); } hashCode = hashCode * 59 + ExpectedBuildNumber.GetHashCode(); if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Pipeline != null) { hashCode = hashCode * 59 + Pipeline.GetHashCode(); } hashCode = hashCode * 59 + QueuedTime.GetHashCode(); return(hashCode); } }
/// <summary> /// Returns true if QueueItemImpl instances are equal /// </summary> /// <param name="other">Instance of QueueItemImpl to be compared</param> /// <returns>Boolean</returns> public bool Equals(QueueItemImpl other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Class == other.Class || Class != null && Class.Equals(other.Class) ) && ( ExpectedBuildNumber == other.ExpectedBuildNumber || ExpectedBuildNumber.Equals(other.ExpectedBuildNumber) ) && ( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Pipeline == other.Pipeline || Pipeline != null && Pipeline.Equals(other.Pipeline) ) && ( QueuedTime == other.QueuedTime || QueuedTime.Equals(other.QueuedTime) )); }