public override int GetHashCode() { unchecked { var hashCode = (Attributes != null ? Attributes.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Callouts != null ? Callouts.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Text != null ? Text.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { unchecked { var hashCode = Attributes?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (Callouts?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Text?.GetHashCode() ?? 0); return(hashCode); } }
protected bool Equals(Listing other) { return(Equals(Attributes, other.Attributes) && Callouts.SequenceEqual(other.Callouts) && string.Equals(Text, other.Text)); }
/// <summary> /// Equalses the specified other. /// </summary> /// <param name="other">The other.</param> /// <returns></returns> protected bool Equals(Listing other) => string.Equals(Text, other.Text) && Equals(Attributes, other.Attributes) && Callouts.SequenceEqual(other.Callouts);