Пример #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 = Type.GetHashCode();
         hashCode = (hashCode * 397) ^ (Id?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Schema?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Comment?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Title?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Default?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ MultipleOf.GetHashCode();
         hashCode = (hashCode * 397) ^ Maximum.GetHashCode();
         hashCode = (hashCode * 397) ^ ExclusiveMaximum.GetHashCode();
         hashCode = (hashCode * 397) ^ Minimum.GetHashCode();
         hashCode = (hashCode * 397) ^ ExclusiveMinimum.GetHashCode();
         hashCode = (hashCode * 397) ^ (MaxLength?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MinLength?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Pattern?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AdditionalItems?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Items?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MaxItems?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MinItems?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (UniqueItems?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Contains?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AdditionalProperties?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Definitions?.GetCollectionHashCode().GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Properties?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (PatternProperties?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Dependencies?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Const?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Enum?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Format?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ContentMediaType?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ContentEncoding?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (If?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Then?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Else?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AllOf?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AnyOf?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (OneOf?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Not?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Required?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Examples?.GetCollectionHashCode() ?? 0);
         return(hashCode);
     }
 }