Esempio n. 1
0
 private static void Init()
 {
     System.Xml.XmlDocument _document = new System.Xml.XmlDocument();
     _document.Load(Xy.Tools.IO.File.foundConfigurationFile("App", Xy.AppSetting.FILE_EXT));
     _connections = new Dictionary<string, DataSettingItem>();
     foreach (System.Xml.XmlNode _item in _document.SelectNodes("AppSetting/ConnectionStrings/Item")) {
         DataSettingItem _dbi = new DataSettingItem(
             _item.Attributes["Name"].Value,
             _item.Attributes["ConnectionString"].Value,
             _item.Attributes["Provider"].Value,
             _item.Attributes["TimeOut"] == null ? 30 : Convert.ToInt32(_item.Attributes["TimeOut"].Value));
         _connections.Add(_dbi.Name, _dbi);
     }
 }
Esempio n. 2
0
 private static void Init()
 {
     System.Xml.XmlDocument _document = new System.Xml.XmlDocument();
     _document.Load(Xy.Tools.IO.File.foundConfigurationFile("App", Xy.AppSetting.FILE_EXT));
     _connections = new Dictionary <string, DataSettingItem>();
     foreach (System.Xml.XmlNode _item in _document.SelectNodes("AppSetting/ConnectionStrings/Item"))
     {
         DataSettingItem _dbi = new DataSettingItem(
             _item.Attributes["Name"].Value,
             _item.Attributes["ConnectionString"].Value,
             _item.Attributes["Provider"].Value,
             _item.Attributes["TimeOut"] == null ? 30 : Convert.ToInt32(_item.Attributes["TimeOut"].Value));
         _connections.Add(_dbi.Name, _dbi);
     }
 }