public void Dispose()
        {
#if NET452
            _testTcpClient.Close();
#else
            _testTcpClient.Dispose();
#endif
            _commandRunner.EndRunCommand();
            WaitForServer(_port, ServerStatus.Offline);
        }
示例#2
0
 public void Dispose()
 {
     try
     {
         Disconnect(_testTcpClient);
     }
     catch (Exception)
     {
         // ignored
     }
     _commandRunner.EndRunCommand();
 }
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                try
                {
                    Disconnect(_testTcpClient);
                }
                catch (Exception)
                {
                    // ignored
                }

                _commandRunner.EndRunCommand();
            }

            _disposed = true;
        }