Beispiel #1
0
 /// <summary>
 /// Process command queue
 /// </summary>
 /// <param name="command"></param>
 private static void ProcessCommandQueue(IMountCommand command)
 {
     try
     {
         if (!IsRunning || _cts.IsCancellationRequested || !Actions.IsConnected)
         {
             return;
         }
         command.Execute(_actions);
         if (command.Id > 0)
         {
             _resultsDictionary.TryAdd(command.Id, command);
         }
     }
     catch (Exception e)
     {
         command.Exception  = e;
         command.Successful = false;
     }
 }