/// <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 (DisplayName != null) { hashCode = hashCode * 59 + DisplayName.GetHashCode(); } if (FullName != null) { hashCode = hashCode * 59 + FullName.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Organization != null) { hashCode = hashCode * 59 + Organization.GetHashCode(); } hashCode = hashCode * 59 + NumberOfFolders.GetHashCode(); hashCode = hashCode * 59 + NumberOfPipelines.GetHashCode(); return(hashCode); } }
/// <summary> /// Returns true if PipelineFolderImpl instances are equal /// </summary> /// <param name="other">Instance of PipelineFolderImpl to be compared</param> /// <returns>Boolean</returns> public bool Equals(PipelineFolderImpl other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Class == other.Class || Class != null && Class.Equals(other.Class) ) && ( DisplayName == other.DisplayName || DisplayName != null && DisplayName.Equals(other.DisplayName) ) && ( FullName == other.FullName || FullName != null && FullName.Equals(other.FullName) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Organization == other.Organization || Organization != null && Organization.Equals(other.Organization) ) && ( NumberOfFolders == other.NumberOfFolders || NumberOfFolders != null && NumberOfFolders.Equals(other.NumberOfFolders) ) && ( NumberOfPipelines == other.NumberOfPipelines || NumberOfPipelines != null && NumberOfPipelines.Equals(other.NumberOfPipelines) )); }