コード例 #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();
 }