Beispiel #1
0
        public override int GetHashCode()
        {
            var result = IndexType.GetHashCode();

            result = 29 * result + Name.GetHashCode();
            // ReSharper disable once NonReadonlyMemberInGetHashCode
            result = 29 * result + Order.GetHashCode();
            return(result);
        }
Beispiel #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ IndexType.GetHashCode();
         hashCode = (hashCode * 397) ^ ValueType.GetHashCode();
         hashCode = (hashCode * 397) ^ ReadOnly.GetHashCode();
         return(hashCode);
     }
 }
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                var hash = 41;
                // Suitable nullity checks etc, of course :)

                if (Automatic != null)
                {
                    hash = hash * 57 + Automatic.GetHashCode();
                }

                if (IndexingMode != null)
                {
                    hash = hash * 57 + IndexingMode.GetHashCode();
                }

                if (IncludePaths != null)
                {
                    hash = hash * 57 + IncludePaths.GetHashCode();
                }

                if (IndexType != null)
                {
                    hash = hash * 57 + IndexType.GetHashCode();
                }

                if (NumericPrecision != null)
                {
                    hash = hash * 57 + NumericPrecision.GetHashCode();
                }

                if (StringPrecision != null)
                {
                    hash = hash * 57 + StringPrecision.GetHashCode();
                }

                if (Path != null)
                {
                    hash = hash * 57 + Path.GetHashCode();
                }

                if (ExcludePaths != null)
                {
                    hash = hash * 57 + ExcludePaths.GetHashCode();
                }

                return(hash);
            }
        }
Beispiel #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (TableName != null ? TableName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TableSchema != null ? TableSchema.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ColumnName != null ? ColumnName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ColumnType != null ? ColumnType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PropertyName != null ? PropertyName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsNullable.GetHashCode();
         hashCode = (hashCode * 397) ^ IsIdentity.GetHashCode();
         hashCode = (hashCode * 397) ^ IndexType.GetHashCode();
         return(hashCode);
     }
 }
Beispiel #5
0
 /// <summary>
 /// Returns the hash code of this object.
 /// </summary>
 /// <returns>The hash code of this object.</returns>
 public override int GetHashCode() =>
 MethodSource.GetHashCode() ^ IndexType.GetHashCode();