Esempio n. 1
0
        public void Start()
        {
            _messageLoop = new WindowsMessageLoopThread();
            var smFactory = new ScannerManagerFactory();

            try
            {
                _scannerManager = smFactory.GetScannerManager(_messageLoop);
            }
            catch (Exception e)
            {
                _logger.ErrorFormat(e.ToString());
            }
            StartServer();
        }
Esempio n. 2
0
        protected override void OnStart(string[] args)
        {
            _logger.InfoFormat("Start service on port: {0}", _port);
            _messageLoop = new WindowsMessageLoopThread();
            var smFactory = new ScannerManagerFactory();

            try
            {
                _scannerManager = smFactory.GetScannerManager(_messageLoop);
            }
            catch (Exception e)
            {
                _logger.ErrorFormat(e.ToString());
            }
            StartServer();
            var sdf = new Thread(() => _logger.InfoFormat("Http server started"));

            sdf.Start();
        }