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