Esempio n. 1
0
        private void FinalizeRelationships()
        {
            // In here we supposed to handle all non-typical cases, such as
            // 1. Immediate parent is not present among the documents;
            // 2. Root of the conversation  is not present among the documents;
            Tracer.Debug("Threads calculation started.");

            var threadsCalculationResults = _threadsProcessor.FinalizeRelationships();

            resultsAccumulator.Append(threadsCalculationResults);

            // Debug
            //Tracer.Warning(resultsAccumulator.ToString());

            DontInsertChildlessTopmostNodes(resultsAccumulator.ListToInsert);

            // Debug
            //Tracer.Warning(resultsAccumulator.ToString());

            Tracer.Debug("Threads calculation completed. Starting production: Insert {0}, Update {1}, Delete {2}",
                         resultsAccumulator.InsertCount, resultsAccumulator.UpdateCount, resultsAccumulator.DeleteCount);
            ProduceThreadsRecords();
            Tracer.Debug("Threads production completed.");
        }