コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((IsNullable.GetHashCode() * 397) ^ IsOptional.GetHashCode());
     }
 }
コード例 #2
0
        public override int GetSemanticHashCode(ExpressionEqualityComparer comparer)
        {
            unchecked
            {
                var hash = Alias.GetHashCode();

                hash = (hash * 16777619) ^ IsNullable.GetHashCode();

                return(hash);
            }
        }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (DefaultValue != null ? DefaultValue.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsNullable.GetHashCode();
         hashCode = (hashCode * 397) ^ (DataType != null ? DataType.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #4
0
ファイル: ColumnDefinition.cs プロジェクト: sGeeK44/Orm
 /// <summary>Fait office de fonction de hachage par défaut. </summary>
 /// <returns>Code de hachage pour l'objet actuel.</returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Ordinal;
         hashCode = (hashCode * 397) ^ IsNullable.GetHashCode();
         hashCode = (hashCode * 397) ^ (DbType != null ? DbType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ColumnName != null ? ColumnName.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ColumnName?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (MemberName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (SystemType != null ? SystemType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsNullable.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)HandyType;
         return(hashCode);
     }
 }
コード例 #6
0
        public override int GetSemanticHashCode(ExpressionEqualityComparer comparer)
        {
            unchecked
            {
                var hash = IsNullable.GetHashCode();

                hash = (hash * 16777619) ^ comparer.GetHashCode(Expression);
                hash = (hash * 16777619) ^ (TypeMapping?.GetHashCode() ?? 0);

                return(hash);
            }
        }
コード例 #7
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (ColumnName != null ? ColumnName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ColumnType != null ? ColumnType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsNullable.GetHashCode();
         hashCode = (hashCode * 397) ^ HasDefaultValue.GetHashCode();
         hashCode = (hashCode * 397) ^ IsPrimaryKey.GetHashCode();
         return(hashCode);
     }
 }
コード例 #8
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)DbType;
         hashCode = (hashCode * 397) ^ Size;
         hashCode = (hashCode * 397) ^ IsStoredProcedureParameter.GetHashCode();
         hashCode = (hashCode * 397) ^ NoQuotes.GetHashCode();
         hashCode = (hashCode * 397) ^ IsNullable.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Direction;
         return(hashCode);
     }
 }
コード例 #9
0
ファイル: DbColumn.cs プロジェクト: Warewolf-ESB/Warewolf
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)SqlDataType;
         hashCode = (hashCode * 397) ^ (ColumnName != null ? ColumnName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsNullable.GetHashCode();
         hashCode = (hashCode * 397) ^ (DataType != null ? DataType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsAutoIncrement.GetHashCode();
         hashCode = (hashCode * 397) ^ MaxLength;
         return(hashCode);
     }
 }
コード例 #10
0
        /// <summary>
        /// Returns the hash code for this object.
        /// </summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            int hashCode = -1182503711;

            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + OrdinalPosition.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ColumnDefault);

            hashCode = hashCode * -1521134295 + IsNullable.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(DataType);

            hashCode = hashCode * -1521134295 + MaxLength.GetHashCode();
            hashCode = hashCode * -1521134295 + NumericPrecision.GetHashCode();
            return(hashCode);
        }
コード例 #11
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);
     }
 }
コード例 #12
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = (Type.GetHashCode() * 397)
                               ^ (Kind.GetHashCode() * 397)
                               ^ (IsNullable.GetHashCode() * 397);

                for (int i = 0; i < TypeArguments.Count; i++)
                {
                    hashCode ^= (TypeArguments[i].GetHashCode() * 397);
                }

                return(hashCode);
            }
        }
コード例 #13
0
 public override int GetHashCode()
 {
     // Courtesy of http://stackoverflow.com/a/263416
     unchecked                 // Overflow is fine, just wrap
     {
         // Note: Don't include the parameter size in the hash code, size is complicated (see the AreSizesEquivalent method for more info)
         var hash = (int)2166136261;
         hash = (hash * 16777619) ^ ParameterName.GetHashCode();
         hash = (hash * 16777619) ^ ((Value == null) ? 0 : Value.GetHashCode());
         hash = (hash * 16777619) ^ DbType.GetHashCode();
         hash = (hash * 16777619) ^ IsNullable.GetHashCode();
         hash = (hash * 16777619) ^ Direction.GetHashCode();
         hash = (hash * 16777619) ^ Scale.GetHashCode();
         return(hash);
     }
 }
コード例 #14
0
ファイル: ColumnInfo.cs プロジェクト: Jaxelr/Insight.Database
        /// <inheritdoc/>
        public override int GetHashCode()
        {
            int hashCode = 17;

            unchecked
            {
                hashCode += Name.GetHashCode();
                hashCode *= 23;
                hashCode += DataType.GetHashCode();
                hashCode *= 23;
                hashCode += IsNullable.GetHashCode();
                hashCode *= 23;
                hashCode += IsIdentity.GetHashCode();
                hashCode *= 23;
                hashCode += IsReadOnly.GetHashCode();
            }

            return(hashCode);
        }
コード例 #15
0
        /// <summary>
        /// Returns the hashcode for this <see cref="DbField"/>.
        /// </summary>
        /// <returns>The hashcode value.</returns>
        public override int GetHashCode()
        {
            if (m_hashCode != null)
            {
                return(m_hashCode.Value);
            }

            var hashCode = 0;

            // Set the hashcode
            hashCode = Name.GetHashCode() + IsPrimary.GetHashCode() + IsIdentity.GetHashCode() + IsNullable.GetHashCode();
            if (Type != null)
            {
                hashCode += Type.GetHashCode();
            }
            if (Size != null)
            {
                hashCode += Size.GetHashCode();
            }
            if (Precision != null)
            {
                hashCode += Precision.GetHashCode();
            }
            if (Scale != null)
            {
                hashCode += Scale.GetHashCode();
            }
            if (DatabaseType != null)
            {
                hashCode += DatabaseType.GetHashCode();
            }

            // Set and return the hashcode
            return((m_hashCode = hashCode).Value);
        }