Пример #1
0
        public int GetHashCode(OneWayCompatibilityMappingEntry obj)
        {
            if (Object.ReferenceEquals(obj, null))
            {
                return(0);
            }

            HashCodeCombiner combiner = new HashCodeCombiner();
            var comparer = new FrameworkRangeComparer();

            combiner.AddObject(comparer.GetHashCode(obj.TargetFrameworkRange));
            combiner.AddObject(comparer.GetHashCode(obj.SupportedFrameworkRange));

            return(combiner.CombinedHash);
        }
Пример #2
0
        public bool Equals(OneWayCompatibilityMappingEntry x, OneWayCompatibilityMappingEntry y)
        {
            if (Object.ReferenceEquals(x, y))
            {
                return(true);
            }

            if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null))
            {
                return(false);
            }

            var comparer = new FrameworkRangeComparer();

            return(comparer.Equals(x.TargetFrameworkRange, y.TargetFrameworkRange) &&
                   comparer.Equals(x.SupportedFrameworkRange, y.SupportedFrameworkRange));
        }
Пример #3
0
        public bool Equals(FrameworkRange other)
        {
            var comparer = new FrameworkRangeComparer();

            return(comparer.Equals(this, other));
        }
Пример #4
0
        public override int GetHashCode()
        {
            var comparer = new FrameworkRangeComparer();

            return(comparer.GetHashCode(this));
        }