/// <summary> /// Process any documents that have been added for publishing. /// </summary> /// <param name="documents">The documents to publish.</param> /// <param name="cancellationToken">Cancellation token.</param> /// <returns>Task for processing the added documents.</returns> protected override async Task OnDocumentsAddedAsync(IEnumerable <IndexDocumentsAction <T> > documents, CancellationToken cancellationToken) { // Raise notifications foreach (IndexDocumentsAction <T> document in documents) { await _sender.RaiseActionAddedAsync(document, cancellationToken).ConfigureAwait(false); } // Add all of the documents and possibly auto flush await base.OnDocumentsAddedAsync(documents, cancellationToken).ConfigureAwait(false); }