Ejemplo n.º 1
0
        /// <summary>
        /// Starts Trade Manager Service
        /// </summary>
        /// <returns>Indicates whether the operation was successful or not.</returns>
        public bool StartService()
        {
            if (_tradeManagerClient != null)
            {
                // Start Client
                _tradeManagerClient.StartCommunicator();

                return(true);
            }

            if (Logger.IsInfoEnabled)
            {
                Logger.Info("Client object not initialized.", _type.FullName, "StartService");
            }

            return(false);
        }
        public void Setup()
        {
            _tradeManagerMqServer = new TradeManagerMqServer("TradeManagerMqConfig.xml");

            // Initialize Server Object
            _applicationController = new ApplicationController(_tradeManagerMqServer, new ExecutionHandler());

            // Start Server
            _applicationController.StartCommunicator();

            _tradeManagerClient = ContextRegistry.GetContext()["TradeManagerClient"] as TradeManagerClient;

            // Start Client
            if (_tradeManagerClient != null)
            {
                _tradeManagerClient.StartCommunicator();
            }
        }