/// <summary>
        /// Provides a hash function for the type.
        /// </summary>
        public override int GetHashCode()
        {
            int callbackHashCode  = (DetermineLocalityCallback != null) ? DetermineLocalityCallback.GetHashCode() : 0;
            int predicateHashCode = (ContinueProcessingPredicate != null)? ContinueProcessingPredicate.GetHashCode() : 0;

            return(DifferenceType.GetHashCode() ^ Locality.GetHashCode() ^ IgnoreTrimWhiteSpace.GetHashCode() ^ WordSplitBehavior.GetHashCode() ^ callbackHashCode ^ predicateHashCode);
        }
示例#2
0
        public override int GetHashCode()
        {
            var hashCode = 862207841;

            hashCode = (hashCode * -1521134295)
                       + EqualityComparer <string> .Default.GetHashCode(BasePath);

            foreach (var excludedDirectory in ExcludedDirectories)
            {
                hashCode = (hashCode * -1521134295)
                           + EqualityComparer <string> .Default.GetHashCode(
                    excludedDirectory);
            }
            foreach (var fileExtension in FileExtensions)
            {
                hashCode = (hashCode * -1521134295)
                           + EqualityComparer <string> .Default.GetHashCode(
                    fileExtension);
            }
            hashCode = (hashCode * -1521134295)
                       + Recursive.GetHashCode();
            hashCode = (hashCode * -1521134295)
                       + DifferenceType.GetHashCode();
            hashCode = (hashCode * -1521134295)
                       + MaxDurationDifferenceSeconds.GetHashCode();
            hashCode = (hashCode * -1521134295)
                       + MaxDurationDifferencePercent.GetHashCode();
            hashCode = (hashCode * -1521134295)
                       + MaxImageCompares.GetHashCode();
            hashCode = (hashCode * -1521134295)
                       + MaxDifferentImages.GetHashCode();
            hashCode = (hashCode * -1521134295)
                       + MaxImageDifferencePercent.GetHashCode();
            return(hashCode);
        }