public IConceptInfo FindByKey(string conceptKey) { if (!_initialized) { Initialize(); } return(_dslContainer.FindByKey(conceptKey)); }
private string LogCreatedConcepts(DslContainer dslContainer, IEnumerable <IConceptInfo> macroCreatedConcepts, List <IConceptInfo> newUniqueConcepts) { var report = new StringBuilder(); LogConcepts(report, "Macro created", macroCreatedConcepts, first: true); LogConcepts(report, "New unique", newUniqueConcepts); LogConcepts(report, "New unresolved", newUniqueConcepts.Where(c => dslContainer.FindByKey(c.GetKey()) == null)); return(report.ToString()); }
private string LogCreatedConcepts(DslContainer dslContainer, IEnumerable <IConceptInfo> macroCreatedConcepts, DslContainer.AddNewConceptsReport newConceptsReport) { var report = new StringBuilder(); var newUniqueIndex = new HashSet <string>(newConceptsReport.NewUniqueConcepts.Select(c => c.GetKey())); LogConcepts(report, "Macro created", macroCreatedConcepts, first: true); LogConcepts(report, "New unique", newConceptsReport.NewUniqueConcepts); 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()); }