示例#1
0
 /// <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
     {
         var hashCode = Name?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Image?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Url?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Tags?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Created.GetHashCode();
         hashCode = (hashCode * 397) ^ Modified.GetHashCode();
         hashCode = (hashCode * 397) ^ (SpecificationVersion?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Apis?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Include?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Maintainers?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
示例#2
0
 /// <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
     {
         var hashCode = (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Image != null ? Image.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Url != null ? Url.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Tags != null ? Tags.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Created.GetHashCode();
         hashCode = (hashCode * 397) ^ Modified.GetHashCode();
         hashCode = (hashCode * 397) ^ (SpecificationVersion != null ? SpecificationVersion.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Apis != null ? Apis.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Include != null ? Include.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Maintainers != null ? Maintainers.GetHashCode() : 0);
         return(hashCode);
     }
 }