Example #1
0
 public void CreateLearningAgent(LearningConfig learningConfig)
 {
     LearningAgent newAgent = new LearningAgent(
         learningConfig.Name,
         learningConfig.NativePids,
         learningConfig.ForeignPids,
         MinPositive,
         MinNegative);
     m_LearningAgents.AddAgent(newAgent);
 }
Example #2
0
 public void AddLearningAgent(IList<int> pids, string name)
 {
     Log.Info("AddLearningAgent: {0}", name);
     Process[] processes = Process.GetProcesses();
     ISet<IPID> nativePids = new SortedSet<IPID>();
     ISet<IPID> foreignPids = new SortedSet<IPID>();
     foreach (Process p in processes)
     {
         if (pids.Contains(p.Id))
         {
             nativePids.Add(new WinPID(p.Id, p.ProcessName));
         }
         else
         {
             foreignPids.Add(new WinPID(p.Id, p.ProcessName));
         }
     }
     LearningConfig learningConfig = new LearningConfig(name, nativePids, foreignPids);
     StartLearning(learningConfig);
 }
Example #3
0
 private void StartLearning(LearningConfig learningConfig)
 {
     m_AgentRegistry.CreateLearningAgent(learningConfig);
 }