/// <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 string ToString() => Headers.Aggregate((a, b) => $"{a}, {b}") + " | " + Rows.Select(item => item.ToString()).Aggregate((a, b) => $"{a}, {b}");