コード例 #1
0
 public void AddImplication(KnowledgeImplication implication, HashSet <string> sources)
 {
     if (implication == null)
     {
         return;
     }
     lock (_model.Implications)
     {
         KnowledgeImplication existing;
         _model.Implications.TryGetValue(implication.ToString(), out existing);
         if (existing == null)
         {
             _model.Implications.Add(implication.ToString(), implication);
         }
         else
         {
             existing.AddSources(sources);
         }
     }
 }
コード例 #2
0
        private bool ExistsInternal(KnowledgeImplication implication)
        {
            KnowledgeImplication existing;

            return(_model.Implications.TryGetValue(implication.ToString(), out existing));
        }