Пример #1
0
        public static ActionDispatcherSchedulerHandle StartOnNewThread()
        {
            ActionDispatcherSchedulerHandle res = null;

            // ReSharper disable once AccessToDisposedClosure
            using (var resetEvent = new ManualResetEvent(false))
            {
                new Thread(o => BotServices.RunDispatcher(d =>
                {
                    res = new ActionDispatcherSchedulerHandle();
                    resetEvent.Set();
                }))
                {
                    IsBackground = true
                }.Start();
                resetEvent.WaitOne();
            }
            return(res);
        }
Пример #2
0
 public void CaptureScheduler()
 {
     this.SetScheduler(BotServices.GetScheduler());
 }
Пример #3
0
 public BotBitsClient() : this(BotServices.GetScheduler())
 {
 }