Exemplo n.º 1
0
        private string LogCreatedConcepts(MacroEvaluator macroEvaluator, IConceptInfo conceptInfo, IEnumerable <IConceptInfo> macroCreatedConcepts, DslContainer.AddNewConceptsReport newConceptsReport)
        {
            var report = new StringBuilder();

            report.Append(macroEvaluator.Name + " on " + conceptInfo.GetShortDescription()
                          + " created: " + string.Join(", ", macroCreatedConcepts.Select(c => c.GetShortDescription())) + ".");

            var newUniqueIndex = new HashSet <string>(newConceptsReport.NewUniqueConcepts.Select(c => c.GetKey()));

            LogConcepts(report, "New resolved", newConceptsReport.NewlyResolvedConcepts.Where(c => newUniqueIndex.Contains(c.GetKey())));
            LogConcepts(report, "Old resolved", newConceptsReport.NewlyResolvedConcepts.Where(c => !newUniqueIndex.Contains(c.GetKey())));
            LogConcepts(report, "New unresolved", newConceptsReport.NewUniqueConcepts.Where(c => _dslContainer.FindByKey(c.GetKey()) == null));

            return(report.ToString());
        }