Пример #1
0
        /// <summary>
        /// Return the HashCode of this object.
        /// </summary>
        /// <returns>The HashCode of this object.</returns>
        public override Int32 GetHashCode()
        {
            unchecked
            {
                return(Value.GetHashCode() * 23 ^

                       (Context.HasValue
                            ? Context.GetHashCode() * 19
                            : 0) ^

                       (Format.HasValue
                            ? Format.GetHashCode() * 17
                            : 0) ^

                       (Measurand.HasValue
                            ? Measurand.GetHashCode() * 13
                            : 0) ^

                       (Phase.HasValue
                            ? Phase.GetHashCode() * 11
                            : 0) ^

                       (Location.HasValue
                            ? Location.GetHashCode() * 7
                            : 0) ^

                       (Unit.HasValue
                            ? Unit.GetHashCode() * 5
                            : 0));
            }
        }
Пример #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Fraction.GetHashCode();
         hashCode = (hashCode * 397) ^ Phase.GetHashCode();
         return((hashCode * 397) ^ Angle.GetHashCode());
     }
 }
Пример #3
0
        public override int GetHashCode()
        {
            int hashCode = 1879084962;

            hashCode = hashCode * -1521134295 + m_animation.GetHashCode();
            hashCode = hashCode * -1521134295 + m_hand.GetHashCode();
            hashCode = hashCode * -1521134295 + m_crouching.GetHashCode();
            hashCode = hashCode * -1521134295 + m_phase.GetHashCode();
            return(hashCode);
        }
Пример #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = Phase.GetHashCode();
         result = (result * 397) ^ (Response != null ? Response.GetHashCode() : 0);
         result = (result * 397) ^ Done.GetHashCode();
         return(result);
     }
 }
Пример #5
0
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked             // Overflow is fine, just wrap
            {
                int hashCode = 41;
                // Suitable nullity checks etc, of course :)

                hashCode = hashCode * 59 + Phase.GetHashCode();

                hashCode = hashCode * 59 + Type.GetHashCode();
                return(hashCode);
            }
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (FinishedAt != null ? FinishedAt.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Message != null ? Message.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (RequestedOperation != null ? RequestedOperation.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Phase != null ? Phase.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (RetryCount != null ? RetryCount.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (StartedAt != null ? StartedAt.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SyncResult != null ? SyncResult.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #7
0
        public override int GetHashCode()
        {
            var hashCode = -722000984;

            unchecked
            {
                hashCode = hashCode * -1521134295 + EqualityComparer <GameBoard> .Default.GetHashCode(Board);

                hashCode = hashCode * -1521134295 + EqualityComparer <IDeck> .Default.GetHashCode(Deck);

                hashCode = hashCode * -1521134295 + EqualityComparer <IList <PlayerHand> > .Default.GetHashCode(Hands);

                hashCode = hashCode * -1521134295 + SunSpaces.GetHashCode();
                hashCode = hashCode * -1521134295 + SunCounter.GetHashCode();
                hashCode = hashCode * -1521134295 + TurnPhase.GetHashCode();
            }
            return(hashCode);
        }
Пример #8
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 :)

                hashCode = hashCode * 59 + Phase.GetHashCode();
                if (Step != null)
                {
                    hashCode = hashCode * 59 + Step.GetHashCode();
                }
                if (Information != null)
                {
                    hashCode = hashCode * 59 + Information.GetHashCode();
                }
                return(hashCode);
            }
        }
Пример #9
0
        public override int GetHashCode()
        {
            lock (locking)
            {
                unchecked
                {
                    int hash = 17;
                    hash = hash * 23 + PotSize;
                    hash = hash * 23 + Phase.GetHashCode();
                    foreach (string card in Board)
                    {
                        hash *= 23;                 // multiply by a prime number
                        hash += card.GetHashCode(); // add next hash code
                    }

                    if (PendingAction != null)
                    {
                        hash = hash * 23 + PendingAction.GetHashCode();
                    }

                    return(hash);
                }
            }
        }
Пример #10
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if ((Name != null) && __isset.Name)
                {
                    hashcode = (hashcode * 397) + Name.GetHashCode();
                }
                if ((Appearance != null) && __isset.Appearance)
                {
                    hashcode = (hashcode * 397) + Appearance.GetHashCode();
                }
                if (__isset.AtomicMass)
                {
                    hashcode = (hashcode * 397) + AtomicMass.GetHashCode();
                }
                if (__isset.Boil)
                {
                    hashcode = (hashcode * 397) + Boil.GetHashCode();
                }
                if ((Category != null) && __isset.Category)
                {
                    hashcode = (hashcode * 397) + Category.GetHashCode();
                }
                if (__isset.Density)
                {
                    hashcode = (hashcode * 397) + Density.GetHashCode();
                }
                if ((DiscoveredBy != null) && __isset.DiscoveredBy)
                {
                    hashcode = (hashcode * 397) + DiscoveredBy.GetHashCode();
                }
                if (__isset.Melt)
                {
                    hashcode = (hashcode * 397) + Melt.GetHashCode();
                }
                if (__isset.MolarHeat)
                {
                    hashcode = (hashcode * 397) + MolarHeat.GetHashCode();
                }
                if ((NamedBy != null) && __isset.NamedBy)
                {
                    hashcode = (hashcode * 397) + NamedBy.GetHashCode();
                }
                if (__isset.Number)
                {
                    hashcode = (hashcode * 397) + Number.GetHashCode();
                }
                if (__isset.Period)
                {
                    hashcode = (hashcode * 397) + Period.GetHashCode();
                }
                if ((Phase != null) && __isset.Phase)
                {
                    hashcode = (hashcode * 397) + Phase.GetHashCode();
                }
                if ((Source != null) && __isset.Source)
                {
                    hashcode = (hashcode * 397) + Source.GetHashCode();
                }
                if ((Summary != null) && __isset.Summary)
                {
                    hashcode = (hashcode * 397) + Summary.GetHashCode();
                }
                if ((Symbol != null) && __isset.Symbol)
                {
                    hashcode = (hashcode * 397) + Symbol.GetHashCode();
                }
                if ((IonizationEnergies != null) && __isset.IonizationEnergies)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(IonizationEnergies);
                }
                if (__isset.ElectronAffinity)
                {
                    hashcode = (hashcode * 397) + ElectronAffinity.GetHashCode();
                }
                if ((ElectronConfiguration != null) && __isset.ElectronConfiguration)
                {
                    hashcode = (hashcode * 397) + ElectronConfiguration.GetHashCode();
                }
                if (__isset.ElectronegativityPaulimg)
                {
                    hashcode = (hashcode * 397) + ElectronegativityPaulimg.GetHashCode();
                }
            }
            return(hashcode);
        }
Пример #11
0
 public override int GetHashCode()
 {
     return(this == null ? 0 : TimeStamp.GetHashCode() ^ SignalID.GetHashCode() ^ Phase.GetHashCode());
 }