Ejemplo n.º 1
0
        /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>
        /// <param name="other">An object to compare with this object.</param>
        /// <returns>true if the current object is equal to the <paramref name="other">other</paramref> parameter; otherwise, false.</returns>
        public bool Equals(OasSchema other)
        {
            if (other is null) return false;
            if (ReferenceEquals(this, other)) return true;

            if (JsonType != other.JsonType) return false;
            if (Format != other.Format) return false;
            if (Options != other.Options) return false;
            if (!NumberRange.Equals(other.NumberRange)) return false;
            if (!ItemsRange.Equals(other.ItemsRange)) return false;
            if (!LengthRange.Equals(other.LengthRange)) return false;
            if (!PropertiesRange.Equals(other.PropertiesRange)) return false;
            if (!ExternalDocumentation.Equals(other.ExternalDocumentation)) return false;
            if (!StringComparer.Ordinal.Equals(Title, other.Title)) return false;
            if (!StringComparer.Ordinal.Equals(Description, other.Description)) return false;
            if (!StringComparer.Ordinal.Equals(Pattern, other.Pattern)) return false;
            if (!Enum.NullableSetEquals(other.Enum)) return false;
            if (!AllOf.NullableSetEquals(other.AllOf)) return false;
            if (!OneOf.NullableSetEquals(other.OneOf)) return false;
            if (!AnyOf.NullableSetEquals(other.AnyOf)) return false;
            if (!Not.NullableSetEquals(other.Not)) return false;
            if (Items != other.Items) return false;
            if (!Properties.NullableDictionaryEquals(other.Properties)) return false;
            if (!AdditionalProperties.NullableDictionaryEquals(other.AdditionalProperties)) return false;

            return true;
        }