示例#1
0
        /// <summary>
        ///     Returns true if IndexingPolicy instances are equal
        /// </summary>
        /// <param name="other">Instance of IndexingPolicy to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(IndexingPolicy other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return
                ((
                     Automatic == other.Automatic ||
                     Automatic != null &&
                     Automatic.Equals(other.Automatic)
                     ) &&
                 (
                     IndexingMode == other.IndexingMode ||
                     IndexingMode != null &&
                     IndexingMode.SequenceEqual(other.IndexingMode)
                 ) &&
                 (
                     IncludePaths == other.IncludePaths ||
                     IncludePaths != null &&
                     IncludePaths.Equals(other.IncludePaths)
                 ) &&
                 (
                     IndexType == other.IndexType ||
                     IndexType != null &&
                     IndexType.Equals(other.IndexType)
                 ) &&
                 (
                     NumericPrecision == other.NumericPrecision ||
                     NumericPrecision != null &&
                     NumericPrecision.Equals(other.NumericPrecision)
                 ) &&
                 (
                     StringPrecision == other.StringPrecision ||
                     StringPrecision != null &&
                     StringPrecision.Equals(other.StringPrecision)
                 ) &&
                 (
                     Path == other.Path ||
                     Path != null &&
                     Path.Equals(other.Path)
                 ) &&
                 (
                     ExcludePaths == other.ExcludePaths ||
                     ExcludePaths != null &&
                     ExcludePaths.Equals(other.ExcludePaths)
                 ));
        }