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