Example #1
0
 /// <summary>
 /// Disposes pipe server
 /// </summary>
 /// <returns></returns>
 public async ValueTask DisposeAsync()
 {
     if (PipeServer != null)
     {
         await PipeServer.DisposeAsync();
     }
 }
Example #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();
 }
Example #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("~~~~~~~~~~~~~~~~~~~~~~~~~~");
        }