/// <summary>
 /// Compares the index location based on it's path
 /// </summary>
 public virtual bool Equals(IIndexLocation other)
 {
     if (other == null)
     {
         return false;
     }
     return other.GetPath().Equals(this.GetPath(), StringComparison.InvariantCultureIgnoreCase);
 }
Esempio n. 2
0
 /// <summary>
 /// Compares the index location based on it's path
 /// </summary>
 public virtual bool Equals(IIndexLocation other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.GetPath().Equals(this.GetPath(), StringComparison.InvariantCultureIgnoreCase));
 }
        /// <summary>
        /// Creates a DirectoryInfo object from the index location's path
        /// </summary>
        /// <param name="location">The index location</param>
        /// <returns>DirectoryInfo</returns>
        public static DirectoryInfo GetDirectory(this IIndexLocation location)
        {
            if (location == null)
            {
                throw new ArgumentNullException("location");
            }

            return(new DirectoryInfo(location.GetPath()));
        }
Esempio n. 4
0
        public EntityDeleteTask(IIndexLocation indexLocation, string fieldName, string value)
        {
            if (indexLocation == null)
            {
                throw new ArgumentNullException("indexLocation");
            }

            if (string.IsNullOrEmpty("fieldName"))
            {
                throw new ArgumentNullException("fieldName");
            }

            if (string.IsNullOrEmpty("value"))
            {
                throw new ArgumentNullException("value");
            }

            term         = new Term(fieldName, value);
            IndexOptions = new IndexOptions {
                IndexLocation = indexLocation
            };
        }
Esempio n. 5
0
        public EntityUpdateTask(TEntity entity, IIndexDefinition <TEntity> definition, IIndexLocation indexLocation)
        {
            if (entity == null)
            {
                throw new ArgumentNullException("entity");
            }

            if (definition == null)
            {
                throw new ArgumentNullException("definition");
            }

            if (indexLocation == null)
            {
                throw new ArgumentNullException("indexLocation");
            }

            this.entity       = entity;
            this.definition   = definition;
            this.IndexOptions = new IndexOptions {
                IndexLocation = indexLocation
            };
        }