Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((_name.GetHashCode() * 397) ^ _dbType.GetHashCode());
     }
 }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode;

                if (LengthDefined)
                {
                    hashCode = (DbType.GetHashCode() / 2) + (Length.GetHashCode() / 2);
                }
                else if (PrecisionDefined)
                {
                    hashCode = (DbType.GetHashCode() / 3) + (Precision.GetHashCode() / 3) + (Scale.GetHashCode() / 3);
                }
                else if (ScaleDefined)
                {
                    hashCode = DbType.GetHashCode() / 3 + Scale.GetHashCode() / 3;
                }
                else
                {
                    hashCode = DbType.GetHashCode();
                }

                return(hashCode);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Gets the hashcode for this object.
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(1379870155 ^
            Name.GetHashCode() ^
            TypeName.GetHashCode() ^
            TypeOwner.GetHashCode() ^
            DbType.GetHashCode() ^
            Length.GetHashCode() ^
            Precision.GetHashCode() ^
            Scale.GetHashCode());
 }
Exemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (SystemType != null ? SystemType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)DataType;
         hashCode = (hashCode * 397) ^ (DbType != null ? DbType.GetHashCode()       : 0);
         hashCode = (hashCode * 397) ^ (Length != null ? Length.Value.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemplo n.º 5
0
 /// <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);
     }
 }
Exemplo n.º 6
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);
     }
 }
Exemplo n.º 7
0
        public override int GetHashCode()
        {
            if (_hashCode != null)
            {
                return(_hashCode.Value);
            }

            unchecked
            {
                var hashCode = (SystemType != null ? SystemType.GetHashCode() : 0);
                hashCode  = (hashCode * 397) ^ (int)DataType;
                hashCode  = (hashCode * 397) ^ (DbType != null ? DbType.GetHashCode()          : 0);
                hashCode  = (hashCode * 397) ^ (Length != null ? Length.Value.GetHashCode()    : 0);
                hashCode  = (hashCode * 397) ^ (Precision != null ? Precision.Value.GetHashCode() : 0);
                hashCode  = (hashCode * 397) ^ (Scale != null ? Scale.Value.GetHashCode()     : 0);
                _hashCode = hashCode;
            }

            return(_hashCode.Value);
        }
Exemplo n.º 8
0
        public override int GetHashCode()
        {
            int code = 0;

            unchecked
            {
                code = Name.GetHashCode() ^ Value.GetHashCode();
                if (DbType != null)
                {
                    code ^= DbType.GetHashCode();
                }
                if (Direction != null)
                {
                    code ^= Direction.GetHashCode();
                }
                if (Size != null)
                {
                    code ^= Size.GetHashCode();
                }
            }
            return(code);
        }
Exemplo n.º 9
0
 ///<inheritdoc/>
 public override int GetHashCode()
 {
     return((DbType.GetHashCode() * 17) ^ SystemType.GetHashCode());
 }
Exemplo n.º 10
0
 /// <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()
 {
     return(_dbType.GetHashCode() ^ (_value == null ? 0 : _value.GetHashCode()));
 }
Exemplo n.º 11
0
 public override int GetHashCode()
 {
     return(value == null?dbType.GetHashCode() : value.GetHashCode());
 }
Exemplo n.º 12
0
 public override int GetHashCode()
 {
     return(_dbType.GetHashCode() ^ _size.GetHashCode() ^ _scale.GetHashCode());
 }