コード例 #1
0
 public IConceptInfo FindByKey(string conceptKey)
 {
     if (!_initialized)
     {
         Initialize();
     }
     return(_dslContainer.FindByKey(conceptKey));
 }
コード例 #2
0
        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());
        }
コード例 #3
0
        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());
        }