예제 #1
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()
        {
            int hash = HashCombiner.Initialize();

            hash = HashCombiner.Hash(hash, First);
            hash = HashCombiner.Hash(hash, Second);

            return(hash);
        }
예제 #2
0
        public override int GetHashCode()
        {
            HashCombiner hash = HashCombiner.Initialize();

            hash.Add(base.GetHashCode());
            hash.Add(target);

            return(hash.Value);
        }
예제 #3
0
        public int GetHashCode(TaskPin obj)
        {
            HashCombiner combiner = HashCombiner.Initialize();

            combiner.Add(obj.DataType);

            if (obj is FlaggedPin)
            {
                combiner.Add((obj as FlaggedPin).Flags);
            }

            return(combiner.Value);
        }
예제 #4
0
 public void Setup()
 {
     _hash = HashCombiner.Initialize();
 }