Exemplo n.º 1
0
 private void TaskHandlerStatusChanged(object sender, TaskHandlerStatus status)
 {
     if (status == TaskHandlerStatus.Free)
     {
         DispatchTask();
         CheckAllTaskComplte();
     }
 }
Exemplo n.º 2
0
 public ComHandlerThread(Guid clsid, string data, int millisecondsTimeout, ComHandlerUpdate onUpdate, Action <int> onComplete)
 {
     objType = Type.GetTypeFromCLSID(clsid, true);
     Data    = data;
     Timeout = millisecondsTimeout;
     status  = new TaskHandlerStatus(i =>
     {
         completed.Set();
         onComplete?.Invoke(i);
     }, onUpdate);
 }