示例#1
0
        /*public void Add(int WorkerID)
         * {
         *      Add(DateTime.Now, WorkerID);
         * }*/

        private void LoadWorkers()
        {
            Bot[] items;

            LogEnter();

            Log(LogLevels.Information, $"Loading existing bots");
            if (!Try(() => botModule.GetBots()).OrAlert(out items, "Failed to load Bots"))
            {
                //Add(DateTime.Now.AddSeconds(retryDelay), -1);
                return;
            }

            foreach (Bot item in items)
            {
                Add(DateTime.Now, item.BotID);
            }
        }
示例#2
0
文件: BotsService.cs 项目: dfgs/PIO
 public Bot[] GetBots()
 {
     LogEnter();
     return(Try(() => botModule.GetBots()).OrThrow(GenerateFaultException));
 }