StatusChanged
EventHub.StatusChanged event
Occurs when the index status changes.
public event EventHandler<BaseIndexEventArgs> StatusChanged;
Examples
The example demonstrates how to use the event.
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";
// Creating an index
Index index = new Index(indexFolder);
// Subscribing to the event
index.Events.StatusChanged += (sender, args) =>
{
if (args.Status != IndexStatus.InProgress)
{
// A notification of the operation completion should be here
}
};
// Setting the flag for asynchronous indexing
IndexingOptions options = new IndexingOptions();
options.IsAsync = true;
// Asynchronous indexing documents from the specified folder
// The method terminates before the operation completes
index.Add(documentsFolder, options);
See Also
- class BaseIndexEventArgs
- class EventHub
- namespace GroupDocs.Search.Events
- assembly GroupDocs.Search