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