예제 #1
0
        public void Dispose()
        {
            JsonWriter.WriteEndArray();
            PipeServer.Disconnect();
            PipeServer.Dispose();
            PipeServer = null;

            Log.Debug("Daemon", $"Stopped device debugger server {{{Identifier}}}");
        }
예제 #2
0
        public void Dispose()
        {
            PipeServer.Disconnect();
            PipeServer.Dispose();
            PipeServer   = null;
            StreamWriter = null;

            Log.Debug($"Stopped log server {{{Identifier}}}");
        }
예제 #3
0
        public void Dispose()
        {
            JsonWriter.WriteEndArray();
            PipeServer.Disconnect();
            PipeServer.Dispose();
            PipeServer = null;

            Log.Debug($"Stopped tablet debugger server {{{Identifier}}}");
        }
예제 #4
0
        /// <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);
            }
        }
예제 #5
0
 public void TearDown()
 {
     if (server != null)
     {
         server.Dispose();
         server = null;
     }
     if (client != null)
     {
         client.Dispose();
         client = null;
     }
 }
예제 #6
0
 /// <summary>
 /// Disposes pipe server
 /// </summary>
 /// <returns></returns>
 public void Dispose()
 {
     PipeServer?.Dispose();
 }
예제 #7
0
 public void DisposeTest()
 {
     server = new PipeServer();
     server.Dispose();
 }