/// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeUtils.CombineHashCodeValues(
                this.Guid.GetHashCode(),
                this.Name.GetHashCode(),
                this.Description.GetHashCode()));
 }
        public void Dictionary_UnequalContents()
        {
            var a = D(1, 2);
            var b = D(3, 4);

            Assert.IsFalse(HashCodeUtils.For(Seed, a) == HashCodeUtils.For(Seed, b));
        }
 /// <inheritdoc />
 public override int GetHashCode()
 {
     return(HashCodeUtils.CombineHashCodeValues(
                base.GetHashCode(),
                this.FileExtension.GetHashCode(),
                this.Description.GetHashCode()));
 }
        public void DictionarySet_EqualSets()
        {
            var a = Ds(1, S(2, 3));
            var b = Ds(1, S(2, 3));

            Assert.IsTrue(HashCodeUtils.For(Seed, a) == HashCodeUtils.For(Seed, b));
        }
Esempio n. 5
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         return((Bin.GetHashCode() * 397) ^ HashCodeUtils.GenerateForEnumerables(Stats, false));
     }
 }
        public void Dictionary_EqualContents()
        {
            var a = D(1, 2);
            var b = D(1, 2);

            Assert.IsTrue(HashCodeUtils.For(Seed, a) == HashCodeUtils.For(Seed, b));
        }
        public void DictionarySet_UnequalLists2()
        {
            var a = Ds(1, L(2, 3));
            var b = Ds(1, L(4, 3));

            Assert.IsFalse(HashCodeUtils.For(Seed, a) == HashCodeUtils.For(Seed, b));
        }
        public override int GetHashCode()
        {
            var hashCode = -882152508;

            hashCode = HashCodeUtils.AggregateAll(hashCode, HashCodeUtils.GenerateForKvps(TrueCount));
            hashCode = HashCodeUtils.AggregateAll(hashCode, HashCodeUtils.GenerateForKvps(FalseCount));
            return(hashCode);
        }
Esempio n. 9
0
        /// <inheritdoc />
        public override int GetHashCode()
        {
            var hashCode = 161077207;

            hashCode = hashCode * -1521134295 + IsPhased.GetHashCode();
            hashCode = hashCode * -1521134295 + HashCodeUtils.GenerateForEnumerables(GenotypeIndices, IsPhased);
            return(hashCode);
        }
Esempio n. 10
0
 public override int GetHashCode()
 {
     unchecked
     {
         var valuesHashCode = HashCodeUtils.For(337, _values);
         return((_maxCacheSize * 397) ^ valuesHashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (HashCodeUtils.For(397, ConcurrentEventList));
         return(hashCode);
     }
 }
Esempio n. 12
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (AppIdentity != null ? AppIdentity.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Properties != null ? HashCodeUtils.GetHashCode(Properties) : 0);
         return(hashCode);
     }
 }
Esempio n. 13
0
        private void CacheState()
        {
            cachedHashCode = HashCodeUtils.Seed;
            cachedHashCode = HashCodeUtils.Hash(cachedHashCode, TypeName);
            cachedHashCode = HashCodeUtils.Hash(cachedHashCode, Keys);

            var keys = Keys.Aggregate((s, t) => $"{s}:{t}");

            cachedToString = $"{(IsTransient ? "T" : "")}VMOID#{keys}{(previous == null ? "" : "+")}";
        }
        private void CacheState()
        {
            cachedHashCode = HashCodeUtils.Seed;
            cachedHashCode = HashCodeUtils.Hash(cachedHashCode, TypeName);
            cachedHashCode = HashCodeUtils.Hash(cachedHashCode, Key);

            object keys = Key.Aggregate((s, t) => s + ":" + t);

            cachedToString = $"{(IsTransient ? "T" : "")}EOID#{keys}{(previous == null ? "" : "+")}";
        }
Esempio n. 15
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (ParentResolver != null ? ParentResolver.GetHashCode() : 2);
         hashCode = (hashCode * 397) ^ HashCodeUtils.For(13, _typeToQuery);
         hashCode = (hashCode * 397) ^ HashCodeUtils.For(17, _idToQuery);
         return(hashCode);
     }
 }
        private void CacheState()
        {
            cachedHashCode = HashCodeUtils.Seed;
            cachedHashCode = HashCodeUtils.Hash(cachedHashCode, TypeName);
            cachedHashCode = HashCodeUtils.Hash(cachedHashCode, Key);

            object keys = Key.Aggregate((s, t) => s + ":" + t);

            cachedToString = string.Format("{0}EOID#{1}{2}", IsTransient ? "T" : "", keys, previous == null ? "" : "+");
        }
Esempio n. 17
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (Content != null ? Content.GetHashCode() : 17);
         hashCode = (hashCode * 397) ^ (StackTrace != null ? HashCodeUtils.For(397, StackTrace) : 13);
         return(hashCode);
     }
 }
Esempio n. 18
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (Scope != null ? Scope.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Action != null ? Action.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (HashCodeUtils.For(397, Targets));
         return(hashCode);
     }
 }
Esempio n. 19
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)IDELifecyclePhase;
         hashCode = (hashCode * 397) ^ (OpenWindows != null ? HashCodeUtils.For(397, OpenWindows) : 0);
         hashCode = (hashCode * 397) ^ (OpenDocuments != null ? HashCodeUtils.For(397, OpenDocuments) : 0);
         return(hashCode);
     }
 }
        public void DictionarySet_UnequalSets3_AdaptationOfContextBug()
        {
            var a = new Dictionary <string, ISet <IMethodName> > {
                { "A", new HashSet <IMethodName> {
                      M("C")
                  } }
            };
            var b = new Dictionary <string, ISet <IMethodName> > {
                { "A", new HashSet <IMethodName> {
                      M("C")
                  } }
            };

            Assert.AreEqual(a, b);
            Assert.IsTrue(HashCodeUtils.For(1, a) == HashCodeUtils.For(1, b));
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = 2954786;
         hashCode = (hashCode * 397) ^ DayFirst.GetHashCode();
         hashCode = (hashCode * 397) ^ DayLast.GetHashCode();
         hashCode = (hashCode * 397) ^ NumDays;
         hashCode = (hashCode * 397) ^ NumMonth;
         hashCode = (hashCode * 397) ^ NumEventsTotal;
         hashCode = (hashCode * 397) ^ HashCodeUtils.For(397, NumEventsDetailed);
         hashCode = (hashCode * 397) ^ (int)Education;
         hashCode = (hashCode * 397) ^ (int)Position;
         hashCode = (hashCode * 397) ^ NumCodeCompletion;
         hashCode = (hashCode * 397) ^ NumTestRuns;
         hashCode = (hashCode * 397) ^ ActiveTime.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 22
0
 public override int GetHashCode()
 {
     return(HashCodeUtils.GetHashCode(_apps.Values));
 }
Esempio n. 23
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (base.GetHashCode() * 397) ^ (TargetClusters != null ? HashCodeUtils.GetHashCode(TargetClusters) : 0);
         return(hashCode);
     }
 }
Esempio n. 24
0
 public override int GetHashCode()
 {
     return(HashCodeUtils.CombineHashCodeValues(
                this.Argument?.GetHashCode() ?? 0,
                this.Description?.GetHashCode() ?? 0));
 }
        public void DictionarySet_EmptyReturnsSeed()
        {
            var a = new Dictionary <int, IEnumerable <int> >();

            Assert.IsTrue(HashCodeUtils.For(Seed, a) == Seed);
        }
        public void Dictionary_EmptyReturnsSeed()
        {
            var a = new Dictionary <int, int>();

            Assert.IsTrue(HashCodeUtils.For(Seed, a) == Seed);
        }