Exemple #1
0
 public void StopShellServerTest(
     [PexAssumeUnderTest] Sonnenberg.ServerManager.Program target,
     ShellServer.Program server
     )
 {
     target.StopShellServer(server);
 }
Exemple #2
0
        /// <summary>
        /// Instantiates the ShellServerManager and creates an Instance of the ShellServer
        /// to stop the ShellServer via ShellServerManager.
        /// </summary>
        /// <seealso cref="ServerManager.Program" />
        /// <seealso cref="ShellServer.Program"/>
        public void StopShellServer()
        {
            var shellServerManager = new ServerManager.Program();

            using (var shellServer = new ShellServer.Program())
            {
                try
                {
                    shellServerManager.StopShellServer(shellServer);
                }
                catch (Exception ex)
                {
                    log.Info(Strings.startServiceSuccess);
                    MessageBox.Show($"{Strings.startServiceSuccess} ({ex.Message})");

                    throw;
                }
            }
        }