示例#1
0
 private void Run()
 {
     while (!_retinaProcessStopped)
     {
         if (_queue.Count > 0)
         {
             try
             {
                 RetinaTaskResponse currentResponse = _queue.Dequeue();
                 if (!string.IsNullOrWhiteSpace(currentResponse?.Message))
                 {
                     _syncContext.Post(e => TriggerLogCallback(currentResponse), null);
                 }
                 else if (currentResponse?.Node != null)
                 {
                     _syncContext.Post(e => TriggerTreeCallback(currentResponse), null);
                 }
             }
             catch
             {
                 // suppress
             }
         }
         //Thread.Sleep(500);
     }
 }
示例#2
0
 private void TriggerTreeCallback(RetinaTaskResponse response) => CallbackTree?.Invoke(this, response);
示例#3
0
 private void TriggerLogCallback(RetinaTaskResponse response) => CallbackLog?.Invoke(this, response);