public MurmurConfig GetConfiguration(string regionName) { IConfigurationService service = m_registry.RequestModuleInterface <IConfigurationService>(); if (service == null) { return(null); } List <string> urls = service.FindValueOf("MurmurServiceURI"); foreach (string url in urls) { OSDMap request = new OSDMap(); request["RegionName"] = regionName; OSDMap response = WebUtils.PostToService(url, request); OSDMap resp = (OSDMap)response["_Result"]; if (resp.Type == OSDType.Unknown) //Make sure we got back a good response { return(null); } //Now parse from OSD MurmurConfig config = new MurmurConfig(); config.FromOSD(resp); return(config); } return(null); }
public MurmurConfig GetConfiguration(string regionName) { IConfigurationService service = m_registry.RequestModuleInterface<IConfigurationService>(); if (service == null) return null; List<string> urls = service.FindValueOf("MurmurServiceURI"); foreach (string url in urls) { OSDMap request = new OSDMap(); request["RegionName"] = regionName; OSDMap resp = OSDParser.DeserializeJson(WebUtils.PostToService(url, request)) as OSDMap; if (resp == null) //Make sure we got back a good response return null; //Now parse from OSD MurmurConfig config = new MurmurConfig(); config.FromOSD(resp); return config; } return null; }
public MurmurConfig GetConfiguration(string regionName) { IConfigurationService service = m_registry.RequestModuleInterface<IConfigurationService>(); if (service == null) return null; List<string> urls = service.FindValueOf("MurmurServiceURI"); foreach (string url in urls) { OSDMap request = new OSDMap(); request["RegionName"] = regionName; OSDMap response = WebUtils.PostToService (url, request, true, true); OSDMap resp = (OSDMap)response["_Result"]; if (resp.Type == OSDType.Unknown) //Make sure we got back a good response return null; //Now parse from OSD MurmurConfig config = new MurmurConfig(); config.FromOSD(resp); return config; } return null; }