protected override void CoreInnerOnLoading()
        {
            //注册processors
            //MidiatorGlobal.Initialize();
            //配置数据库连接字符串
            Global.DbMySql = new Database(SystemWorker.Instance.ConfigurationProxy.GetField("CoinAPI", Global.MySql), Global.CommandTimeOut);
            DatabaseManager.Inject(Global.DbMySql, Global.DbMySql);

            ServiceManager.Instance.Initialize();
            Global.RemoteApiService = ServiceManager.Instance.GetService <RemoteApiService>();
            Global.RemoteApiService.Initialize();
            _protocolStack = new MetadataProtocolStack();
            _tracing.Info("     #CoinAPI::Initialize protocol stack succeed!");
            Console.WriteLine("     #CoinAPI::Initialize protocol stack succeed!");
            _transactionManager = new MetadataTransactionManager(new TransactionIdentityComparer());
            _scheduler          = new MetadataMessageRequestScheduler();

            //注册代理器
            _scheduler.Regist(new GetTickerFromOKCoinProcessor());

            _scheduler.CreateDynamicCounters();
            _tracing.Info("     #CoinAPI::Regist business processors succeed!");
            Console.WriteLine("     #CoinAPI::Regist business processors succeed!");
            _tracing.Info("     #CoinAPI::BasicBusinessComponent load succeed!");
            Console.WriteLine("     #CoinAPI::BasicBusinessComponent load succeed!");
        }
        //channel created event.
        void ChannelCreated(object sender, LightSingleArgEventArgs <ITransportChannel> e)
        {
            IMessageTransportChannel <MetadataContainer> msgChannel = new MessageTransportChannel <MetadataContainer>((IRawTransportChannel)e.Target, _protocolStack);
            IServerConnectionAgent <MetadataContainer>   agent      = new MetadataConnectionAgent(msgChannel, _transactionManager);

            _scheduler.Regist(agent);
        }