Esempio n. 1
0
 public virtual void Add(SwitchRoutineExecutor <T> bot)
 {
     if (Bots.Any(z => z.Bot.Connection.IP == bot.Connection.IP && z.Bot.Config.UsbPortIndex == bot.Config.UsbPortIndex && z.Bot.Config.ConnectionType == bot.Config.ConnectionType))
     {
         throw new ArgumentException($"{(bot.Config.ConnectionType == ConnectionType.WiFi ? nameof(bot.Connection.IP) : nameof(bot.Config.UsbPortIndex))} has already been added.");
     }
     Bots.Add(new BotSource <T>(bot));
 }
Esempio n. 2
0
 public virtual void Add(SwitchRoutineExecutor <T> bot)
 {
     if (Bots.Any(z => z.Bot.Connection.IP == bot.Connection.IP))
     {
         throw new ArgumentException($"{nameof(bot.Connection.IP)} has already been added.");
     }
     Bots.Add(new BotSource <T>(bot));
 }
Esempio n. 3
0
 public BotSource(SwitchRoutineExecutor <T> bot) => Bot = bot;