Lucene.Net.Index.IndexWriter.NoDupDirs C# (CSharp) Method

NoDupDirs() private method

private NoDupDirs ( Lucene.Net.Store.Directory dirs ) : void
dirs Lucene.Net.Store.Directory
return void
		private void  NoDupDirs(Directory[] dirs)
		{
            HashSet<Directory> dups = new HashSet<Directory>();
			for (int i = 0; i < dirs.Length; i++)
			{
                if (dups.Contains(dirs[i]))
				{
					throw new System.ArgumentException("Directory " + dirs[i] + " appears more than once");
				}
				if (dirs[i] == directory)
					throw new System.ArgumentException("Cannot add directory to itself");
                dups.Add(dirs[i]);
            }
		}
		
IndexWriter