Exemplo n.º 1
0
        public IRunner Create()
        {
            var instance = new RunnerInstance(rand.Next());

            RunnersCollection.Add(instance);
            return(instance.ViewModel);
        }
Exemplo n.º 2
0
        public IRunner Create()
        {
            var instance = new RunnerInstance(rand.Next());

            instance.ViewModel.ConfigChanged   += OnRunnerSessionChanged;
            instance.ViewModel.WordlistChanged += OnRunnerSessionChanged;
            RunnersCollection.Add(instance);
            return(instance.ViewModel);
        }
Exemplo n.º 3
0
 public void SaveSession()
 {
     _repo.RemoveAll();
     _repo.Add(RunnersCollection
               .Select(r => r.ViewModel)
               .Select(r => new RunnerSessionData()
     {
         Bots      = r.BotsAmount,
         Config    = r.Config != null ? r.ConfigName : "",
         Wordlist  = r.Wordlist != null ? r.Wordlist.Path : "",
         ProxyMode = r.ProxyMode
     }
                       ));
 }
Exemplo n.º 4
0
 public void RemoveAll()
 {
     RunnersCollection.Clear();
 }
Exemplo n.º 5
0
 public void Remove(int id)
 {
     RunnersCollection.Remove(Get(id));
 }
Exemplo n.º 6
0
 public void Remove(IRunner runner)
 {
     RunnersCollection.Remove(RunnersCollection.First(r => r.ViewModel == runner));
 }
Exemplo n.º 7
0
 public RunnerInstance Get(int id)
 {
     return(RunnersCollection.Where(r => r.Id == id).First());
 }