AddToRepository

AddToRepository(Index)

Adds an index to the index repository.

public void AddToRepository(Index index)
Parameter Type Description
index Index The index to add.

Exceptions

exception condition
ArgumentNullException The index is null.

Remarks

The repository does not dispose of the index: dispose of it when it is no longer needed, see Dispose.

Examples

The example demonstrates how to add an index to the index repository.

Index index = new Index();

IndexRepository indexRepository = new IndexRepository();

indexRepository.AddToRepository(index);

See Also


AddToRepository(string)

Opens and adds an index to the index repository.

public void AddToRepository(string indexFolder)
Parameter Type Description
indexFolder String The index folder.

Exceptions

exception condition
IOException Another Index object uses the folder, in this process or in another one, or an index is saved or updated into the folder at the moment.

Remarks

The repository does not dispose of the index: dispose of it when it is no longer needed, see Dispose.

Examples

The example demonstrates how to add an index to the index repository.

string indexFolder = @"c:\MyIndex\";

IndexRepository indexRepository = new IndexRepository();

indexRepository.AddToRepository(indexFolder);

See Also