Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Rel?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (Href?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Title?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Beispiel #2
0
 /// <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 (Rel != null)
         {
             hashCode = hashCode * 59 + Rel.GetHashCode();
         }
         if (Href != null)
         {
             hashCode = hashCode * 59 + Href.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #3
0
 public override int GetHashCode()
 {
     return(base.GetHashCode() ^ (Rel != null? Rel.GetHashCode() : 1) ^ (Attributes != null? Attributes.GetHashCode() : 1));
 }