Exemplo n.º 1
0
 private void RunTask(Operation operation)
 {
     if (currentTask != null)
     {
         logger.LogDebug("Dispose running task");
         currentTask.Dispose();
         currentTask = null;
     }
     if (taskFactories.TryGetValue(operation, out ITaskFactory factory))
     {
         currentTask = factory.Create();
         currentTask.Start();
     }
     else
     {
         logger.LogWarning("Missing task for operation {0}", operation);
     }
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     currentTask?.Dispose();
     subscriptionToHauptwerkStatus.Dispose();
 }