Esempio n. 1
0
        public async Task Stop()
        {
            _cancellationTokenSource.Cancel();
            await _namedPipeClientStream.DisposeAsync();

            if (_readerTask != null)
            {
                await _readerTask;
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Dispose all resources
 /// </summary>
 public async ValueTask DisposeAsync()
 {
     cancellationToken.Dispose();
     if (pipe != null)
     {
         await pipe.DisposeAsync();
     }
     if (client != null)
     {
         await client.DisposeAsync();
     }
 }
 public ValueTask DisposeAsync()
 {
     return(_clientStream.DisposeAsync());
 }
Esempio n. 4
0
 public async ValueTask DisposeAsync()
 {
     cts.Cancel();
     await pipe.DisposeAsync();
 }