public void AddKnowledgeBox(IBotKnowledgeBox box, AITask recievingTask) { if (!_perTaskKnowledgeBases.ContainsKey(recievingTask)) { _perTaskKnowledgeBases[recievingTask] = new BotKnowledgeBase(); } _perTaskKnowledgeBases[recievingTask].AddKnowledgeBox(box); }
public void AddKnowledgeBox(IBotKnowledgeBox box, AITask recievingTask = null) { if (recievingTask == null) { _knowledgeBase.AddKnowledgeBox(box); } else { _knowledgeBase.AddKnowledgeBox(box, recievingTask); } }
public void AddKnowledgeBox(IBotKnowledgeBox box) { Preconditions.Assert(!_knowledgeBoxes.Any(c => box.GetType().IsInstanceOfType(c)), "There arleady is knowledge box of type " + box.GetType()); _knowledgeBoxes.Add(box); }