Example #1
0
        /// <summary>
        /// Connects/Starts a client
        /// </summary>
        public bool Start()
        {
            if (!_isConnected)
            {
                _communicationController.Connect();
            }

            if (Logger.IsInfoEnabled)
            {
                Logger.Info("Starting Simulated Data Exchange Connector", _type.FullName, "Start");
            }

            //_communicationController.PublishMarketAdminMessage("DataLogin");

            // Raise Login Event
            LoginArrived();

            return(true);
        }
        /// <summary>
        /// Starts the Connection to Simulated Exchange Order Execution Provider.
        /// </summary>
        /// <returns></returns>
        public bool Start()
        {
            try
            {
                if (!_isConnected)
                {
                    _communicationController.Connect();
                }

                if (Logger.IsInfoEnabled)
                {
                    Logger.Info("Starting Simulated Order Exchange Connector", _type.FullName, "Start");
                }
                //_communicationController.PublishOrderAdminMessage("OrderLogin");

                LoginArrivedFromSimulatedExchange();
                return(true);
            }
            catch (Exception exception)
            {
                Logger.Error(exception, _type.FullName, "Start");
                return(false);
            }
        }