public void Dispose() { JsonWriter.WriteEndArray(); PipeServer.Disconnect(); PipeServer.Dispose(); PipeServer = null; Log.Debug("Daemon", $"Stopped device debugger server {{{Identifier}}}"); }
public void Dispose() { PipeServer.Disconnect(); PipeServer.Dispose(); PipeServer = null; StreamWriter = null; Log.Debug($"Stopped log server {{{Identifier}}}"); }
public void Dispose() { JsonWriter.WriteEndArray(); PipeServer.Disconnect(); PipeServer.Dispose(); PipeServer = null; Log.Debug($"Stopped tablet debugger server {{{Identifier}}}"); }
/// <inheritdoc /> /// <summary> /// Stops a Pipe Server with this Pipe Service. Waits for all /// Pipe Communication to halt, then closes all Pipe(s) /// </summary> public void Stop() { try { // Wait for Pipe communication to stop _pipeServer.WaitForDrain(); _pipeServer.Disconnect(); // Close Pipe _pipeServer.Dispose(); _memoryCache.Set(SERVICE_MEMORY, false); } catch (ObjectDisposedException ode) { _logger.LogMessage(SERVICE_NAME, ode.Message, LogLevel.Error); _memoryCache.Set(SERVICE_MEMORY, false); throw new PipeServiceException(ode.Message); } catch (NotSupportedException nse) { _logger.LogMessage(SERVICE_NAME, nse.Message, LogLevel.Error); _memoryCache.Set(SERVICE_MEMORY, false); throw new PipeServiceException(nse.Message); } catch (IOException ioe) { _logger.LogMessage(SERVICE_NAME, ioe.Message, LogLevel.Error); _memoryCache.Set(SERVICE_MEMORY, false); throw new PipeServiceException(ioe.Message); } catch (InvalidOperationException ioe) { _logger.LogMessage(SERVICE_NAME, ioe.Message, LogLevel.Error); _memoryCache.Set(SERVICE_MEMORY, false); throw new PipeServiceException(ioe.Message); } }
public void TearDown() { if (server != null) { server.Dispose(); server = null; } if (client != null) { client.Dispose(); client = null; } }
/// <summary> /// Disposes pipe server /// </summary> /// <returns></returns> public void Dispose() { PipeServer?.Dispose(); }
public void DisposeTest() { server = new PipeServer(); server.Dispose(); }