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); } } }
private bool ExistsInternal(KnowledgeImplication implication) { KnowledgeImplication existing; return(_model.Implications.TryGetValue(implication.ToString(), out existing)); }