public void Stop()
        {
            if (nodeHelper != null)
            {
                //bypass exceptions in the case that console is stopped unexpectedly
                try
                {
                    //we do this to ensure that while node manager is being disconnected
                    //it is not doing logic
                    nodeHelper.Disconnect(id);
                }
                catch
                {
                }
            }

            if (channel != null)
            {
                RemotingHelper.UnregisterChannel(channel);
                RemotingServices.Disconnect(this);
            }

            context    = null;
            nodeHelper = null;
        }
        public void UnRegister()
        {
            if (ConsoleDisconnect != null)
            {
                ConsoleDisconnect(this, EventArgs.Empty);
            }

            nodeHelper = null;
        }
        public void Register(List <string> instruments)
        {
            //read GM clientNodeHelper too
            nodeHelper = (IClientNodeHelper)Activator.GetObject(
                typeof(IClientNodeHelper),
                "tcp://" + serverIp + ":" + GeneralConfig.ClientNodeHelperPort.ToString() + "/GeneticMarket.ClientNodeHelper");

            context.RegisterAll(instruments, nodeHelper);
            context.GeneticEnvironment.Start();

            if (ConsoleConnect != null)
            {
                ConsoleConnect(this, EventArgs.Empty);
            }
        }