public void Initialize(IConfigSource config, IRegistryCore registry)
        {
            IConfig handlerConfig = config.Configs["Handlers"];
            if (handlerConfig.GetString("AgentInfoHandler", "") != Name)
                return;

            string localAssetHandler = handlerConfig.GetString("LocalAgentInfoHandler", "AgentInfoService");
            List<IAgentInfoService> services = AuroraModuleLoader.PickupModules<IAgentInfoService>();
#if (!ISWIN)
            foreach (IAgentInfoService s in services)
            {
                if (s.GetType().Name == localAssetHandler) m_localService = s;
            }
#else
                foreach (IAgentInfoService s in services.Where(s => s.GetType().Name == localAssetHandler))
                m_localService = s;
#endif
            if (m_localService == null)
                m_localService = new AgentInfoService();
            m_localService.Initialize(config, registry);
            m_remoteService = new AgentInfoConnector();
            m_remoteService.Initialize(config, registry);
            registry.RegisterModuleInterface<IAgentInfoService>(this);
            m_registry = registry;
        }
示例#2
0
        public void Initialize(IConfigSource config, IRegistryCore registry)
        {
            IConfig handlerConfig = config.Configs["Handlers"];
            if (handlerConfig.GetString("AgentInfoHandler", "") != Name)
                return;

            m_localService = new AgentInfoService();
            m_localService.Initialize(config, registry);
            m_remoteService = new AgentInfoConnector();
            m_remoteService.Initialize(config, registry);
            registry.RegisterModuleInterface<IAgentInfoService>(this);
        }