/// <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(); } if (Actions != null) { hashCode = hashCode * 59 + Actions.GetHashCode(); } if (Blocked != null) { hashCode = hashCode * 59 + Blocked.GetHashCode(); } if (Buildable != null) { hashCode = hashCode * 59 + Buildable.GetHashCode(); } if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (InQueueSince != null) { hashCode = hashCode * 59 + InQueueSince.GetHashCode(); } if (Params != null) { hashCode = hashCode * 59 + Params.GetHashCode(); } if (Stuck != null) { hashCode = hashCode * 59 + Stuck.GetHashCode(); } if (Task != null) { hashCode = hashCode * 59 + Task.GetHashCode(); } if (Url != null) { hashCode = hashCode * 59 + Url.GetHashCode(); } if (Why != null) { hashCode = hashCode * 59 + Why.GetHashCode(); } if (BuildableStartMilliseconds != null) { hashCode = hashCode * 59 + BuildableStartMilliseconds.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if QueueBlockedItem instances are equal /// </summary> /// <param name="other">Instance of QueueBlockedItem to be compared</param> /// <returns>Boolean</returns> public bool Equals(QueueBlockedItem other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Class == other.Class || Class != null && Class.Equals(other.Class) ) && ( Actions == other.Actions || Actions != null && other.Actions != null && Actions.SequenceEqual(other.Actions) ) && ( Blocked == other.Blocked || Blocked.Equals(other.Blocked) ) && ( Buildable == other.Buildable || Buildable.Equals(other.Buildable) ) && ( Id == other.Id || Id.Equals(other.Id) ) && ( InQueueSince == other.InQueueSince || InQueueSince.Equals(other.InQueueSince) ) && ( Params == other.Params || Params != null && Params.Equals(other.Params) ) && ( Stuck == other.Stuck || Stuck.Equals(other.Stuck) ) && ( Task == other.Task || Task != null && Task.Equals(other.Task) ) && ( Url == other.Url || Url != null && Url.Equals(other.Url) ) && ( Why == other.Why || Why != null && Why.Equals(other.Why) ) && ( BuildableStartMilliseconds == other.BuildableStartMilliseconds || BuildableStartMilliseconds.Equals(other.BuildableStartMilliseconds) )); }
/// <summary> /// Returns true if QueueLeftItem instances are equal /// </summary> /// <param name="other">Instance of QueueLeftItem to be compared</param> /// <returns>Boolean</returns> public bool Equals(QueueLeftItem other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Class == other.Class || Class != null && Class.Equals(other.Class) ) && ( Actions == other.Actions || Actions != null && Actions.SequenceEqual(other.Actions) ) && ( Blocked == other.Blocked || Blocked != null && Blocked.Equals(other.Blocked) ) && ( Buildable == other.Buildable || Buildable != null && Buildable.Equals(other.Buildable) ) && ( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( InQueueSince == other.InQueueSince || InQueueSince != null && InQueueSince.Equals(other.InQueueSince) ) && ( Params == other.Params || Params != null && Params.Equals(other.Params) ) && ( Stuck == other.Stuck || Stuck != null && Stuck.Equals(other.Stuck) ) && ( Task == other.Task || Task != null && Task.Equals(other.Task) ) && ( Url == other.Url || Url != null && Url.Equals(other.Url) ) && ( Why == other.Why || Why != null && Why.Equals(other.Why) ) && ( Cancelled == other.Cancelled || Cancelled != null && Cancelled.Equals(other.Cancelled) ) && ( Executable == other.Executable || Executable != null && Executable.Equals(other.Executable) )); }