Beispiel #1
0
            public int GetHashCode(Tuple <string, string> tuple)
            {
                var combiner = new HashCodeCombiner();

                combiner.AddStringIgnoreCase(tuple.Item1);
                combiner.AddStringIgnoreCase(tuple.Item2);
                return(combiner.CombinedHash);
            }
Beispiel #2
0
        public override int GetHashCode()
        {
            var combiner = new HashCodeCombiner();

            combiner.AddStringIgnoreCase(Key);

            return(combiner.CombinedHash);
        }
            public override int GetHashCode()
            {
                var hashCode = new HashCodeCombiner();

                hashCode.AddStringIgnoreCase(Id);
                hashCode.AddObject(IsProject);

                return(hashCode.CombinedHash);
            }
        public static string GetCacheId(string packageId, bool includePrerelease, IReadOnlyCollection <PackageSourceContextInfo> packageSources)
        {
            var hashCodeCombiner = new HashCodeCombiner();

            hashCodeCombiner.AddSequence(packageSources);
            hashCodeCombiner.AddStringIgnoreCase(packageId);
            hashCodeCombiner.AddObject(includePrerelease.GetHashCode());
            return(hashCodeCombiner.CombinedHash.ToString(CultureInfo.InvariantCulture));
        }
Beispiel #5
0
        public int GetHashCode(IServerPackage obj)
        {
            var combiner = new HashCodeCombiner();

            combiner.AddStringIgnoreCase(obj.Id);
            combiner.AddObject(obj.Version);

            return(combiner.CombinedHash);
        }
Beispiel #6
0
        public override int GetHashCode()
        {
            var combiner = new HashCodeCombiner();

            combiner.AddStringIgnoreCase(Name);
            combiner.AddObject(Version);
            combiner.AddObject(Type);

            return(combiner.CombinedHash);
        }