Exemplo n.º 1
0
 private void UploadCache(string str)
 {
     try
     {
         this.cache = ConfigConvert.XmlToConfig(str);
     }
     catch (Exception ex)
     {
         Log.LogMessage("TCBase.Data", "数据库配置文件转换失败", LogType.Error, true, ex, (object)new
         {
             configInfo = str
         });
     }
 }
Exemplo n.º 2
0
 public ConnStringManager()
 {
     if (this.cache == null)
     {
         string xml = ConfigCenterClient.Get("TCBase.Data");
         try
         {
             this.cache = ConfigConvert.XmlToConfig(xml);
         }
         catch (Exception ex)
         {
             Log.LogMessage("TCBase.Data", "数据库配置文件转换失败", LogType.Error, true, ex, (object)new
             {
                 configInfo = xml
             });
         }
     }
     ConfigCenterClient.ConfigChanged += new EventHandler <ConfigDataEventArgs>(this.ConfigCenterClient_ConfigChanged);
 }