OperationProgressChanged
EventHub.OperationProgressChanged event
Occurs when the progress of the indexing or update operation changes.
public event EventHandler<OperationProgressEventArgs> OperationProgressChanged;
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.OperationProgressChanged += (sender, args) =>
{
Console.WriteLine("Last processed: " + args.LastDocumentPath);
Console.WriteLine("Result: " + args.LastDocumentStatus);
Console.WriteLine("Processed documents: " + args.TotalDocuments);
Console.WriteLine("Progress percentage: " + args.ProgressPercentage);
};
// Indexing documents from the specified folder
index.Add(documentsFolder);
See Also
- class OperationProgressEventArgs
- class EventHub
- namespace GroupDocs.Search.Events
- assembly GroupDocs.Search