EventHubStatusChanged Event |
Namespace: GroupDocs.Search.Events
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);