示例#1
0
 public Task StartAsync(CancellationToken cancellationToken)
 {
     _logger?.LogInformation($"Control Loop is starting.");
     _lifetime.ApplicationStarted.Register(() =>
     {
         _logger?.LogInformation($"Control Loop is running.");
         _loopWorker.StartWorker();
     });
     return(Task.CompletedTask);
 }
示例#2
0
 public Task StartAsync(CancellationToken cancellationToken)
 {
     _logger?.LogInformation("Stabilizer loop is starting.");
     //Todo: Check if Hardware is connected AND server is started, then start control loop.
     _lifetime.ApplicationStarted.Register(() =>
     {
         _logger?.LogInformation("Stabilizer loop is running.");
         _worker.StartWorker();
     });
     return(Task.CompletedTask);
 }