Beispiel #1
0
 public void GetName(Action <string> getNameSuccess)
 {
     if (_error)
     {
         return;
     }
     _actions.Enqueue(() =>
     {
         var name = _bot.GetName();
         if (getNameSuccess != null)
         {
             getNameSuccess(name);
         }
     });
     ExecuteNext();
 }
Beispiel #2
0
 /// <summary>
 ///     Get the unique identifier string the BotManager uses to compare IBot classes.
 ///     Currently implemented as "bot.GetName() - bot.GetVersion()"
 ///     No two bots should be loaded with the same name and version combination
 /// </summary>
 /// <param name="bot">bot to get the Id of</param>
 /// <returns>string identifier of the IBot class</returns>
 public static string GetBotId(IBot bot)
 {
     return(bot.GetName() + "-" + bot.GetVersion());
 }