/// <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
     {
         return((this.Type.GetHashCode() * 397) ^ EnumerableComparer.GetHashCode(this.Literals));
     }
 }
 /// <summary>
 /// The get hash code.
 /// </summary>
 /// <returns>
 /// The <see cref="int"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return((EnumerableComparer.GetHashCode(this.Interfaces) * 397) ^ (this.SimplifiedType?.GetHashCode() ?? 0));
     }
 }
        /// <summary>
        /// The equals.
        /// </summary>
        /// <param name="obj">
        /// The obj.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public override bool Equals(object obj)
        {
            var other = obj as SerializableTypeDescriptor;

            return(other != null &&
                   EnumerableComparer.Equals(this.Interfaces, other.Interfaces) &&
                   string.Equals(this.SimplifiedType, other.SimplifiedType));
        }
        /// <summary>
        /// Determines whether the specified <see cref="object" />, is equal to this instance.
        /// </summary>
        /// <param name="obj">The <see cref="object" /> to compare with this instance.</param>
        /// <returns>
        ///   <c>true</c> if the specified <see cref="object" /> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        public override bool Equals(object obj)
        {
            var other = obj as SerializableAutoCompletions;

            return(other != null &&
                   this.Type == other.Type &&
                   EnumerableComparer.Equals(this.Literals, other.Literals));
        }
        /// <summary>
        /// The equals.
        /// </summary>
        /// <param name="obj">
        /// The other.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public override bool Equals(object obj)
        {
            var other = obj as SerializableDataSourceDescriptor;

            return(other != null &&
                   this.Alias == other.Alias &&
                   this.AllowsAnyColumnName == other.AllowsAnyColumnName &&
                   EnumerableComparer.Equals(this.Columns, other.Columns));
        }
 /// <summary>
 /// The get hash code.
 /// </summary>
 /// <returns>
 /// The <see cref="int"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = this.AllowsAnyColumnName.GetHashCode();
         hashCode = (hashCode * 397) ^ EnumerableComparer.GetHashCode(this.Columns);
         hashCode = (hashCode * 397) ^ (this.Alias?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Ejemplo n.º 7
0
        /// <summary>
        /// The equals.
        /// </summary>
        /// <param name="obj">
        /// The obj.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public override bool Equals(object obj)
        {
            var other = obj as SerializableFunctionDescriptor;

            return(other != null &&
                   this.IsAggregateFunction == other.IsAggregateFunction &&
                   string.Equals(this.Name, other.Name) &&
                   string.Equals(this.Description, other.Description) &&
                   object.Equals(this.ReturnType, other.ReturnType) &&
                   EnumerableComparer.Equals(this.Arguments, other.Arguments));
        }
        /// <summary>
        /// The equals.
        /// </summary>
        /// <param name="obj">
        /// The obj.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        public override bool Equals(object obj)
        {
            var other = obj as SerializableDocumentDescriptor;

            return(other != null &&
                   EnumerableComparer.Equals(this.Functions, other.Functions) &&
                   EnumerableComparer.Equals(this.Messages, other.Messages) &&
                   EnumerableComparer.Equals(this.Plugins, other.Plugins) &&
                   EnumerableComparer.Equals(this.Sources, other.Sources) &&
                   EnumerableComparer.Equals(this.Tokens, other.Tokens) &&
                   EnumerableComparer.Equals(this.Variables, other.Variables));
        }
Ejemplo n.º 9
0
 /// <summary>
 /// The get hash code.
 /// </summary>
 /// <returns>
 /// The <see cref="int"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = EnumerableComparer.GetHashCode(this.Arguments);
         hashCode = (hashCode * 397) ^ (this.Description?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ this.IsAggregateFunction.GetHashCode();
         hashCode = (hashCode * 397) ^ (this.Name?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (this.ReturnType?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
 /// <summary>
 /// The get hash code.
 /// </summary>
 /// <returns>
 /// The <see cref="int"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = EnumerableComparer.GetHashCode(this.Functions);
         hashCode = (hashCode * 397) ^ EnumerableComparer.GetHashCode(this.Messages);
         hashCode = (hashCode * 397) ^ EnumerableComparer.GetHashCode(this.Plugins);
         hashCode = (hashCode * 397) ^ EnumerableComparer.GetHashCode(this.Sources);
         hashCode = (hashCode * 397) ^ EnumerableComparer.GetHashCode(this.Tokens);
         hashCode = (hashCode * 397) ^ EnumerableComparer.GetHashCode(this.Variables);
         return(hashCode);
     }
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Gets the hash code based on the elements in the <see cref="IEnumerable{T}"/>.
 /// </summary>
 /// <typeparam name="T">
 /// The type of the elements.
 /// </typeparam>
 /// <param name="obj">
 /// The <see cref="IEnumerable{T}"/>.
 /// </param>
 /// <returns>
 /// The hash code.
 /// </returns>
 public static int GetHashCode <T>(IEnumerable <T> obj)
 {
     return(EnumerableComparer <T> .GetHashCode(obj));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Checks if two <see cref="IEnumerable{T}"/>s are equal.
 /// </summary>
 /// <typeparam name="T">
 /// The type of the elements.
 /// </typeparam>
 /// <param name="x">
 /// The first value.
 /// </param>
 /// <param name="y">
 /// The second value.
 /// </param>
 /// <returns>
 /// <c>true</c> if the values are equal, <c>false</c> otherwise.
 /// </returns>
 public static bool Equals <T>(IEnumerable <T> x, IEnumerable <T> y)
 {
     return(EnumerableComparer <T> .Equals(x, y));
 }