public void RunInAppStartInitTest() { ConfigServiceClient ci = new ConfigServiceClient(); var r = ci.RunInAppStartInit(); Assert.IsTrue(r != null); Assert.IsTrue(r.Result); }
public void GetComponentConfigTest() { ConfigServiceClient ci = new ConfigServiceClient(); ci.RunInAppStartInit(); var r = ci.GetComponentConfig(1001); Assert.IsTrue(r != null); Assert.IsTrue(r.ComponentId==1001); }
public ConfigServiceClient GetConfigClient() { if (_gobalConfigClient == null) { _gobalConfigClient = new ConfigServiceClient(); _gobalConfigClient.RunInAppStartInit(); } return(_gobalConfigClient); }
static ConfigHelper() { _configService = ConfigClientFactory.Instance.GetConfigClient(); _compoentConfig = _configService.GetComponentConfig(DefineTable.ComponentID);//不进行null检查保证配置初始化出现问题时爆出异常 _config = XmlConfigSerializer.Instance.FromXml<ServiceFactoryServerConfig>(_compoentConfig.Content);//不进行null检查保证配置初始化出现问题时爆出异常 }