Exemplo n.º 1
0
        public void Run(
            Services.Cache cache,
            Services.Settings setting,
            Services.ConfigMgr configMgr,
            Services.Servers servers)
        {
            //external dependency injection
            coreCtrl = new CoreServerComponent.CoreCtrl(setting, configMgr);
            states   = new CoreServerComponent.CoreStates(servers, coreInfo);
            logger   = new CoreServerComponent.Logger(setting);
            configer = new CoreServerComponent.Configer(
                setting, cache, configMgr, coreInfo);

            AddChild(coreCtrl);
            AddChild(states);
            AddChild(logger);
            AddChild(configer);

            //inter-container dependency injection
            coreCtrl.Prepare();
            states.Prepare();
            logger.Prepare();
            configer.Prepare();


            //other initializiations
            coreCtrl.BindEvents();
        }
Exemplo n.º 2
0
        public override void Prepare()
        {
            v2rayCore = new Libs.V2Ray.Core(setting);

            coreStates = GetSibling <CoreStates>();
            configer   = GetSibling <Configer>();
            logger     = GetSibling <Logger>();

            bookKeeper = new VgcApis.Libs.Tasks.Routine(RecordStatSample, 3000);
        }
Exemplo n.º 3
0
 public override void Prepare()
 {
     coreCtrl = GetSibling <CoreCtrl>();
     configer = GetSibling <Configer>();
 }