private void ProduceThreadsRecords() { // Debug //Tracer.Debug(resultsAccumulator.ToString()); Parallel.Invoke( () => vaultHelper.Delete(resultsAccumulator.ListToDelete, "DOC_DocumentThreads"), () => IndexHelper.DeleteFromSearchEngine(resultsAccumulator.ListToDelete, MatterId, CollectionId), () => vaultHelper.Insert(resultsAccumulator.ListToInsert), () => vaultHelper.Update(resultsAccumulator.ListToUpdate), () => IndexHelper.UpsertThreadsInSearchEngine(resultsAccumulator.ListToInsert.SafeConcat(resultsAccumulator.ListToUpdate), MatterId, CollectionId) ); IncreaseProcessedDocumentsCount( resultsAccumulator.InsertCount + resultsAccumulator.UpdateCount + resultsAccumulator.DeleteCount ); }