Ejemplo n.º 1
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);
            }
        }
Ejemplo n.º 2
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);
        }
Ejemplo 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());
 }
Ejemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)Type;
         hashCode = (hashCode * 397) ^ Length.GetHashCode();
         hashCode = (hashCode * 397) ^ Precision.GetHashCode();
         hashCode = (hashCode * 397) ^ Scale.GetHashCode();
         return(hashCode);
     }
 }
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Latitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Longitude.GetHashCode();
         hashCode = (hashCode * 397) ^ Precision.GetHashCode();
         hashCode = (hashCode * 397) ^ (Globe != null ? Globe.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 6
0
        /// <summary>
        ///     Returns a hash code for this object.
        /// </summary>
        /// <returns> The hash code. </returns>
        public override int GetHashCode()
        {
            var hashCode = ClrType?.GetHashCode() ?? 0;

            hashCode = (hashCode * 397) ^ IsKeyOrIndex.GetHashCode();
            hashCode = (hashCode * 397) ^ (Size?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (IsUnicode?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (IsRowVersion?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (Scale?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (Precision?.GetHashCode() ?? 0);
            return(hashCode);
        }
Ejemplo n.º 7
0
            /// <summary>
            ///     Returns a hash code for this object.
            /// </summary>
            /// <returns> The hash code. </returns>
            public override int GetHashCode()
            {
                var hashCode = (StoreClrType != null ? StoreClrType.GetHashCode() : 0);

                hashCode = (hashCode * 397) ^ IsKeyOrIndex.GetHashCode();
                hashCode = (hashCode * 397) ^ (Size?.GetHashCode() ?? 0);
                hashCode = (hashCode * 397) ^ (IsUnicode?.GetHashCode() ?? 0);
                hashCode = (hashCode * 397) ^ (IsRowVersion?.GetHashCode() ?? 0);
                hashCode = (hashCode * 397) ^ (IsFixedLength?.GetHashCode() ?? 0);
                hashCode = (hashCode * 397) ^ (Scale?.GetHashCode() ?? 0);
                hashCode = (hashCode * 397) ^ (Precision?.GetHashCode() ?? 0);
                hashCode = (hashCode * 397) ^ (_customConverter?.GetHashCode() ?? 0);
                hashCode = (hashCode * 397) ^ (ModelClrType?.GetHashCode() ?? 0);
                return(hashCode);
            }
        /// <summary>
        ///     Returns a hash code for this object.
        /// </summary>
        /// <returns> The hash code. </returns>
        public override int GetHashCode()
        {
            var hashCode = (ConfiguredProviderClrType != null ? ConfiguredProviderClrType.GetHashCode() : 0);

            hashCode = (hashCode * 397) ^ IsKeyOrIndex.GetHashCode();
            hashCode = (hashCode * 397) ^ (Size?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (MemberInfo?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (IsUnicode?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (IsRowVersion?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (Scale?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (Precision?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (_customConverter?.GetHashCode() ?? 0);
            hashCode = (hashCode * 397) ^ (ModelClrType?.GetHashCode() ?? 0);
            return(hashCode);
        }
Ejemplo n.º 9
0
        public override int GetHashCode()
        {
            var hashCode = -657939666;

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

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

            hashCode = hashCode * -1521134295 + IsPK.GetHashCode();
            hashCode = hashCode * -1521134295 + Nullable.GetHashCode();
            hashCode = hashCode * -1521134295 + Size.GetHashCode();
            hashCode = hashCode * -1521134295 + Precision.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(BaseType);

            return(hashCode);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 17;
         hash = hash * 29 + MessageType.GetHashCode();
         hash = hash * 29 + Symbol.GetHashCode();
         hash = hash * 29 + Side.GetHashCode();
         hash = hash * 29 + Price.GetHashCode();
         hash = hash * 29 + Size.GetHashCode();
         hash = hash * 29 + OrderCount.GetHashCode();
         hash = hash * 29 + Precision.GetHashCode();
         hash = hash * 29 + Time.GetHashCode();
         hash = hash * 29 + Date.GetHashCode();
         return(hash);
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Recall != 0D)
            {
                hash ^= Recall.GetHashCode();
            }
            if (Precision != 0D)
            {
                hash ^= Precision.GetHashCode();
            }
            if (SumSquaredError != 0D)
            {
                hash ^= SumSquaredError.GetHashCode();
            }
            if (NumFrameObstacle != 0)
            {
                hash ^= NumFrameObstacle.GetHashCode();
            }
            if (NumPredictedTrajectory != 0)
            {
                hash ^= NumPredictedTrajectory.GetHashCode();
            }
            if (NumFuturePoint != 0)
            {
                hash ^= NumFuturePoint.GetHashCode();
            }
            if (NumCorrectlyPredictedFrameObstacle != 0D)
            {
                hash ^= NumCorrectlyPredictedFrameObstacle.GetHashCode();
            }
            if (Situation.Length != 0)
            {
                hash ^= Situation.GetHashCode();
            }
            if (TimeRange != 0D)
            {
                hash ^= TimeRange.GetHashCode();
            }
            if (MinTimeRange != 0D)
            {
                hash ^= MinTimeRange.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 12
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 17;
         hash = hash * 29 + MessageType.GetHashCode();
         hash = hash * 29 + Symbol.GetHashCode();
         hash = hash * 29 + OrderId.GetHashCode();
         hash = hash * 29 + MMID.GetHashCode();
         hash = hash * 29 + Side.GetHashCode();
         hash = hash * 29 + Price.GetHashCode();
         hash = hash * 29 + Size.GetHashCode();
         hash = hash * 29 + OrderPriority.GetHashCode();
         hash = hash * 29 + Precision.GetHashCode();
         hash = hash * 29 + OrderTime.GetHashCode();
         hash = hash * 29 + OrderDate.GetHashCode();
         return(hash);
     }
 }
Ejemplo n.º 13
0
        /// <summary></summary>
        public override int GetHashCode()
        {
            var code = 13;

            // Calculate hash on each properties one by one
            code = (code * 7) + Unit.GetHashCode();
            if (Precision != null)
            {
                code = (code * 7) + Precision.GetHashCode();
            }
            if (this.Value != null)
            {
                code = (code * 7) + Value.GetHashCode();
            }
            if (this.Type != null)
            {
                code = (code * 7) + Type.GetHashCode();
            }
            return(code);
        }
Ejemplo n.º 14
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (isset.type)
                {
                    hashcode = (hashcode * 397) + Type.GetHashCode();
                }
                if (isset.encoding)
                {
                    hashcode = (hashcode * 397) + Encoding.GetHashCode();
                }
                if (isset.nullable)
                {
                    hashcode = (hashcode * 397) + Nullable.GetHashCode();
                }
                if (isset.is_array)
                {
                    hashcode = (hashcode * 397) + Is_array.GetHashCode();
                }
                if (isset.precision)
                {
                    hashcode = (hashcode * 397) + Precision.GetHashCode();
                }
                if (isset.scale)
                {
                    hashcode = (hashcode * 397) + Scale.GetHashCode();
                }
                if (isset.comp_param)
                {
                    hashcode = (hashcode * 397) + Comp_param.GetHashCode();
                }
                if (isset.size)
                {
                    hashcode = (hashcode * 397) + Size.GetHashCode();
                }
            }
            return(hashcode);
        }
Ejemplo n.º 15
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Type != global::Google.Cloud.BigQuery.Storage.V1.TableFieldSchema.Types.Type.Unspecified)
            {
                hash ^= Type.GetHashCode();
            }
            if (Mode != global::Google.Cloud.BigQuery.Storage.V1.TableFieldSchema.Types.Mode.Unspecified)
            {
                hash ^= Mode.GetHashCode();
            }
            hash ^= fields_.GetHashCode();
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (MaxLength != 0L)
            {
                hash ^= MaxLength.GetHashCode();
            }
            if (Precision != 0L)
            {
                hash ^= Precision.GetHashCode();
            }
            if (Scale != 0L)
            {
                hash ^= Scale.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Ejemplo n.º 16
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = Id != null
                    ? Id.GetHashCode()
                    : 0;

                hashCode = (hashCode * 397) ^ (Title != null
                    ? Title.GetHashCode()
                    : 0);
                hashCode = (hashCode * 397) ^ (Name != null
                    ? Name.GetHashCode()
                    : 0);
                hashCode = (hashCode * 397) ^ (int)Type;
                hashCode = (hashCode * 397) ^ (ExtraTitleInfo != null
                    ? ExtraTitleInfo.GetHashCode()
                    : 0);
                hashCode = (hashCode * 397) ^ (Category != null
                    ? Category.GetHashCode()
                    : 0);
                hashCode = (hashCode * 397) ^ Allocation.GetHashCode();
                hashCode = (hashCode * 397) ^ Precision.GetHashCode();
                hashCode = (hashCode * 397) ^ Calculated.GetHashCode();
                hashCode = (hashCode * 397) ^ Segmentable.GetHashCode();
                hashCode = (hashCode * 397) ^ (Description != null
                    ? Description.GetHashCode()
                    : 0);
                hashCode = (hashCode * 397) ^ (int)Polarity;
                hashCode = (hashCode * 397) ^ (HelpLink != null
                    ? HelpLink.GetHashCode()
                    : 0);
                hashCode = (hashCode * 397) ^ AllowedForReporting.GetHashCode();

                return(hashCode);
            }
        }
Ejemplo n.º 17
0
 public override int GetHashCode()
 {
     return((TypeCode.GetHashCode() * Scale) + Precision.GetHashCode());
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (CoinType != null)
         {
             hashCode = hashCode * 59 + CoinType.GetHashCode();
         }
         if (WalletName != null)
         {
             hashCode = hashCode * 59 + WalletName.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Symbol != null)
         {
             hashCode = hashCode * 59 + Symbol.GetHashCode();
         }
         if (WalletSymbol != null)
         {
             hashCode = hashCode * 59 + WalletSymbol.GetHashCode();
         }
         if (WalletType != null)
         {
             hashCode = hashCode * 59 + WalletType.GetHashCode();
         }
         if (TransactionFee != null)
         {
             hashCode = hashCode * 59 + TransactionFee.GetHashCode();
         }
         if (Precision != null)
         {
             hashCode = hashCode * 59 + Precision.GetHashCode();
         }
         if (BackingCoinType != null)
         {
             hashCode = hashCode * 59 + BackingCoinType.GetHashCode();
         }
         if (SupportsOutputMemos != null)
         {
             hashCode = hashCode * 59 + SupportsOutputMemos.GetHashCode();
         }
         if (Restricted != null)
         {
             hashCode = hashCode * 59 + Restricted.GetHashCode();
         }
         if (Authorized != null)
         {
             hashCode = hashCode * 59 + Authorized.GetHashCode();
         }
         if (NotAuthorizedReasons != null)
         {
             hashCode = hashCode * 59 + NotAuthorizedReasons.GetHashCode();
         }
         return(hashCode);
     }
 }