public void Start(IConfigSource config, IRegistryCore registry)
        {
            IConfig hgConfig = config.Configs["HyperGrid"];

            if (hgConfig == null || !hgConfig.GetBoolean("Enabled", false))
            {
                return;
            }

            registry.RegisterModuleInterface <GatekeeperServiceInConnector> (this);
            bool    enabled    = false;
            IConfig gridConfig = config.Configs["GatekeeperService"];

            if (gridConfig != null)
            {
                m_Proxy = gridConfig.GetBoolean("HasProxy", false);
                enabled = gridConfig.GetBoolean("Enabled", enabled);
            }
            if (!enabled)
            {
                return;
            }
            IHttpServer       server     = MainServer.Instance;
            HypergridHandlers hghandlers = new HypergridHandlers(registry.RequestModuleInterface <IGatekeeperService> ());

            server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false);
            server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false);

            server.AddStreamHandler(new GatekeeperAgentHandler(registry.RequestModuleInterface <IGatekeeperService> (),
                                                               registry.RequestModuleInterface <ISimulationService>(), m_Proxy));
        }
        public void Start(IConfigSource config, IRegistryCore registry)
        {
            IConfig hgConfig = config.Configs["HyperGrid"];
            if (hgConfig == null || !hgConfig.GetBoolean ("Enabled", false))
                return;

            registry.RegisterModuleInterface<GatekeeperServiceInConnector> (this);
            bool enabled = false;
            IConfig gridConfig = config.Configs["GatekeeperService"];
            if (gridConfig != null)
            {
                m_Proxy = gridConfig.GetBoolean ("HasProxy", false);
                enabled = gridConfig.GetBoolean ("Enabled", enabled);
            }
            if (!enabled)
                return;
            IHttpServer server = MainServer.Instance;
            HypergridHandlers hghandlers = new HypergridHandlers (registry.RequestModuleInterface<IGatekeeperService> ());
            server.AddXmlRPCHandler ("link_region", hghandlers.LinkRegionRequest, false);
            server.AddXmlRPCHandler ("get_region", hghandlers.GetRegion, false);

            server.AddStreamHandler (new GatekeeperAgentHandler (registry.RequestModuleInterface<IGatekeeperService> (),
                registry.RequestModuleInterface<ISimulationService>(), m_Proxy));
        }