Beispiel #1
0
 public bool Stop(HostControl hostControl)
 {
     using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30)))
     {
         _stoppable.StopAsync(cts.Token).Wait();
     }
     return(true);
 }
Beispiel #2
0
 /// <summary>
 /// Stops the tranport listener.
 /// </summary>
 /// <returns></returns>
 public static Task StopAsync(this IStoppable stoppable) => stoppable.StopAsync(CancellationToken.None);
Beispiel #3
0
 public void Stop()
 {
     _file.DisposeIfDisposable();
     _stoppable.StopAsync().Wait();
 }
Beispiel #4
0
 public void Stop()
 {
     _stoppable.StopAsync().Wait();
 }