Beispiel #1
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 (Code != null)
         {
             hashCode = hashCode * 59 + Code.GetHashCode();
         }
         if (ShortName != null)
         {
             hashCode = hashCode * 59 + ShortName.GetHashCode();
         }
         if (LongName != null)
         {
             hashCode = hashCode * 59 + LongName.GetHashCode();
         }
         if (ExternalReference != null)
         {
             hashCode = hashCode * 59 + ExternalReference.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #2
0
        public override int GetHashCode()
        {
            int result;

            result = (Name != null ? Name.GetHashCode() : 0);
            result = 31 * result + (LongName != null ? LongName.GetHashCode() : 0);
            return(result);
        }
Beispiel #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (ShortName != null ? ShortName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (LongName != null ? LongName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Hours;
         return(hashCode);
     }
 }
Beispiel #4
0
 /// <inheritdoc/>
 public override int GetHashCode()
 {
     unchecked {
         int hash = 31;
         hash = (hash * 17) + ShortName.GetHashCode();
         hash = (hash * 17) + LongName.GetHashCode();
         hash = (hash * 17) + Arguments.GetHashCode();
         hash = (hash * 17) + Occurs.GetHashCode();
         return(hash);
     }
 }
Beispiel #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 17;
         hash = hash * 29 + (RequestId != null ? RequestId.GetHashCode() : 0);
         hash = hash * 29 + TradeConditionId.GetHashCode();
         hash = hash * 29 + ShortName.GetHashCode();
         hash = hash * 29 + LongName.GetHashCode();
         return(hash);
     }
 }
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = 17;
                hash = hash * 29 + RequestId != null?RequestId.GetHashCode() : 0;

                hash = hash * 29 + SecurityTypeId.GetHashCode();
                hash = hash * 29 + ShortName.GetHashCode();
                hash = hash * 29 + LongName.GetHashCode();
                return(hash);
            }
        }
Beispiel #7
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = 17;
                hash = hash * 29 + RequestId != null?RequestId.GetHashCode() : 0;

                hash = hash * 29 + ListedMarketId.GetHashCode();
                hash = hash * 29 + ShortName.GetHashCode();
                hash = hash * 29 + LongName.GetHashCode();
                hash = hash * 29 + GroupId.GetHashCode();
                hash = hash * 29 + ShortGroupName.GetHashCode();
                return(hash);
            }
        }
Beispiel #8
0
        /// <inheritdoc/>
        public override int GetHashCode()
        {
            unchecked {
                int hash = 31;
                hash = (hash * 17) + ShortName.GetHashCode();
                hash = (hash * 17) + LongName.GetHashCode();
                hash = (hash * 17) + Count.GetHashCode();

                foreach (var argument in Arguments)
                {
                    hash = (hash * 17) + argument.GetHashCode();
                }

                return(hash);
            }
        }
Beispiel #9
0
                public override int GetHashCode()
                {
                    int hash = 1;

                    if (LongName.Length != 0)
                    {
                        hash ^= LongName.GetHashCode();
                    }
                    if (ShortName.Length != 0)
                    {
                        hash ^= ShortName.GetHashCode();
                    }
                    if (Category.Length != 0)
                    {
                        hash ^= Category.GetHashCode();
                    }
                    if (FlopCount != 0F)
                    {
                        hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FlopCount);
                    }
                    if (TranscendentalCount != 0F)
                    {
                        hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TranscendentalCount);
                    }
                    if (BytesAccessed != 0F)
                    {
                        hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BytesAccessed);
                    }
                    if (OptimalSeconds != 0F)
                    {
                        hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OptimalSeconds);
                    }
                    if (ProfileIndex != 0L)
                    {
                        hash ^= ProfileIndex.GetHashCode();
                    }
                    if (_unknownFields != null)
                    {
                        hash ^= _unknownFields.GetHashCode();
                    }
                    return(hash);
                }
Beispiel #10
0
 /// <inheritdoc/>
 /// <remarks>The only contributing property is <see cref="LongName"/>.</remarks>
 public override int GetHashCode() => LongName.GetHashCode();
Beispiel #11
0
 public override int GetHashCode()
 {
     return(Code.GetHashCode() ^ Name.GetHashCode() ^ ShortName.GetHashCode() ^ LongName.GetHashCode() ^ VariantName.GetHashCode() ^ SecondaryName.GetHashCode() ^ Locale.GetHashCode());
 }
Beispiel #12
0
 /// <summary>
 ///     Serves as a hash function for a particular type.
 /// </summary>
 /// <remarks>A hash code for the current <see cref="System.Object" />.</remarks>
 public override int GetHashCode()
 {
     return(ShortName.GetHashCode() ^ LongName.GetHashCode());
 }