Example #1
0
        public void Unload()
        {
            //Stop service application
            ServiceApplication.Stop();

            ServiceApplication = null;
        }
Example #2
0
 private static void stopServer()
 {
     if (_serviceApplication != null)
     {
         _serviceApplication.Stop();
         Console.WriteLine("Stopped.");
     }
 }
Example #3
0
 private void StopServer()
 {
     if (_server != null)
     {
         _server.Stop();
         _server       = null;
         _adminService = null;
     }
 }
Example #4
0
        private void StopServer()
        {
            if (_serviceApplication == null)
            {
                return;
            }

            _serviceApplication.Stop();
        }
        /// <summary>
        /// Handles Client event of 'Stop Server' button.
        /// </summary>
        /// <param name="sender">Source of event</param>
        /// <param name="e">Event arguments</param>
        private void btnStopServer_Click(object sender, RoutedEventArgs e)
        {
            if (_serviceApplication == null)
            {
                return;
            }

            _serviceApplication.Stop();

            btnStartServer.IsEnabled = true;
            btnStopServer.IsEnabled  = false;
            txtPort.IsEnabled        = true;
        }
Example #6
0
        private void StartServer()
        {
            var host = Settings.Default.connectionHost;

            _server       = ScsServiceBuilder.CreateService(new ScsTcpEndPoint(host, 442));
            _adminService = new DataNormalizatorService();
            _adminService.OnClientCollectActivated   += ClientActivated;
            _adminService.OnClientCollectDeactivated += ClientDeactivated;
            _adminService.OnClientCrashed            += RemoveUserFromCollectQueue;
            _adminService.OnCollectRequest           += CollectRequest;
            _adminService.OnCollectFinished          += CollectFinished;
            _adminService.OnAllCollectStopped        += RemoveUserFromCollectQueue;
            _adminService.OnClientAddedNewSymbol     += RefreshSymbols;
            _server.AddService <IDataNormalizatorService, DataNormalizatorService>(_adminService);
            try
            {
                _server.Start();
            }
            catch (Exception e)
            {
                _server.Stop();
                Console.Write(e.Message);
            }
        }
Example #7
0
 public void CloseSockets()
 {
     //Stop service application
     _serviceApplication.Stop();
 }
Example #8
0
 private void stopServerBtn_Click(object sender, EventArgs e)
 {
     server.Stop();
 }
Example #9
0
 public void CloseSockets()
 {
     //Stop service application
     _serviceApplication.Stop();
     _bank.CloseBankConnection();
 }
Example #10
0
 private void stopServerBtn_Click(object sender, EventArgs e)
 {
     serviceApplication.Stop();
     aLogger.LogMessage("Server Stopped...\n", LogMsgType.Verbose);
 }
 public void Stop()
 {
     _scsServiceApplication.Stop();
 }
Example #12
0
        private void StartServer()
        {
            var host = Settings.Default.connectionHost;

            _server = ScsServiceBuilder.CreateService(new ScsTcpEndPoint(host, 442));
            _adminService = new DataNormalizatorService();
            _adminService.OnClientCollectActivated += ClientActivated;
            _adminService.OnClientCollectDeactivated += ClientDeactivated;
            _adminService.OnClientCrashed += RemoveUserFromCollectQueue;
            _adminService.OnCollectRequest += CollectRequest;
            _adminService.OnCollectFinished += CollectFinished;
            _adminService.OnAllCollectStopped += RemoveUserFromCollectQueue;
            _adminService.OnClientAddedNewSymbol += RefreshSymbols;
            _server.AddService<IDataNormalizatorService, DataNormalizatorService>(_adminService);
            try
            {
                _server.Start();
            }
            catch (Exception e)
            {
                _server.Stop();
                Console.Write(e.Message);
            }
        }