Esempio n. 1
0
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                var hash = 41;
                // Suitable nullity checks etc, of course :)

                if (Automatic != null)
                {
                    hash = hash * 57 + Automatic.GetHashCode();
                }

                if (IndexingMode != null)
                {
                    hash = hash * 57 + IndexingMode.GetHashCode();
                }

                if (IncludePaths != null)
                {
                    hash = hash * 57 + IncludePaths.GetHashCode();
                }

                if (IndexType != null)
                {
                    hash = hash * 57 + IndexType.GetHashCode();
                }

                if (NumericPrecision != null)
                {
                    hash = hash * 57 + NumericPrecision.GetHashCode();
                }

                if (StringPrecision != null)
                {
                    hash = hash * 57 + StringPrecision.GetHashCode();
                }

                if (Path != null)
                {
                    hash = hash * 57 + Path.GetHashCode();
                }

                if (ExcludePaths != null)
                {
                    hash = hash * 57 + ExcludePaths.GetHashCode();
                }

                return(hash);
            }
        }