Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
 /// <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);
     }
 }
Esempio n. 3
0
 protected bool Equals(Listing other)
 {
     return(Equals(Attributes, other.Attributes) &&
            Callouts.SequenceEqual(other.Callouts) &&
            string.Equals(Text, other.Text));
 }
Esempio n. 4
0
 /// <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);