Exemplo n.º 1
0
 /// <summary>
 /// Disposes pipe server
 /// </summary>
 /// <returns></returns>
 public async ValueTask DisposeAsync()
 {
     if (PipeServer != null)
     {
         await PipeServer.DisposeAsync();
     }
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     try
     {
         Stop();
         _pipe.MessageReceived    -= OnMessage;
         _pipe.ClientConnected    -= OnDisconnected;
         _pipe.ClientDisconnected -= OnConnected;
         _pipe.DisposeAsync();
     }
     catch (Exception ex)
     {
         Debug.WriteLine($"Dalamud error: {ex.Message}");
     }
     _clients.Clear();
 }
Exemplo n.º 3
0
        public async Task TearDown()
        {
            Trace.WriteLine("---");
            Trace.WriteLine("Stopping client and server...");

            if (_server != null)
            {
                await _server.DisposeAsync();
            }
            if (_client != null)
            {
                await _client.DisposeAsync();
            }

            Trace.WriteLine("Client and server stopped");
            Trace.WriteLine($"Test took {DateTime.Now - _startTime}");
            Trace.WriteLine("~~~~~~~~~~~~~~~~~~~~~~~~~~");
        }