EventHubStatusChanged Event
Occurs when the index status changes.

Namespace: GroupDocs.Search.Events
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 21.3
Syntax
public event EventHandler<BaseIndexEventArgs> StatusChanged

Value

Type: SystemEventHandlerBaseIndexEventArgs
Examples
The example demonstrates how to use the event.
C#
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