/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns> /// A hash code for the current <see cref="T:System.Object" />. /// </returns> public override int GetHashCode() { unchecked { // ReSharper disable NonReadonlyFieldInGetHashCode int hashCode = Name?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (Path?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Source?.GetHashCode() ?? 0); if (OutputMappings != null) { hashCode = OutputMappings.Aggregate(hashCode, (a, b) => a * 397 ^ (b?.GetHashCode() ?? 0)); } hashCode = (hashCode * 397) ^ (QueryString?.GetHashCode() ?? 0); if (Headers != null) { hashCode = Headers.Aggregate(hashCode, (current, nameValue) => (current * 397) ^ (nameValue != null ? nameValue.GetHashCode() : 0)); } hashCode = (hashCode * 397) ^ (PostData?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ Method.GetHashCode(); return(hashCode); // ReSharper restore NonReadonlyFieldInGetHashCode } }
public override int GetHashCode() { unchecked { var hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (Headers != null ? Headers.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QueryString != null ? QueryString.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OutputDescription != null ? OutputDescription.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = AcknowledgementTypeId; hashCode = (hashCode * 397) ^ AuthenticationLifetimeExtensionSupported.GetHashCode(); hashCode = (hashCode * 397) ^ (AuthorityId?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Path?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (QueryString?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (RetryPolicyId?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (TopicName?.GetHashCode() ?? 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (Headers != null ? Headers.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (QueryString != null ? QueryString.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OutputDescription != null ? OutputDescription.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PostData != null ? PostData.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (IsManualChecked.GetHashCode()); hashCode = (hashCode * 397) ^ (IsFormDataChecked.GetHashCode()); return(hashCode); } }
public override int GetHashCode() => Method.GetHashCode() ^ Host.GetHashCode() ^ PathBase.GetHashCode() ^ Path.GetHashCode() ^ QueryString.GetHashCode();