コード例 #1
0
        private DBWorker DBWorkerInit()
        {
            DBWorker dBWorker = new DBWorker(GetConnectionStringToTestDB());

            SetupTestDB();
            dBWorker.Connect();
            return(dBWorker);
        }
コード例 #2
0
 public virtual void Start()
 {
     try
     {
         sender_to_tg.Start();
         dBWorker.Connect();
         Task <User> meWaiting = botClient.GetMeAsync();
         meWaiting.Wait();
         me = meWaiting.Result;
         dBWorker.add_user(DateTime.UtcNow, botClient.BotId, token, me.Username);
         botClient.StartReceiving();
     }
     catch (Exception ex)
     {
         logger.Error(ex);
     }
 }