internal void Dispose(string url) { if (ConnDic[url] != null) { ConnDic[url].Dispose(); } ConnDic.Remove(url); ActiveDBKeyList.Remove(url); }
internal void Dispose() { foreach (var key in ConnDic.Keys) { if (ConnDic[key] != null) { ConnDic[key].Dispose(); } } ActiveDBKeyList.Clear(); ConnDic.Clear(); this.ActiveDBKeyList = new StringCollection(); }
internal void Dispose(string url) { //잘못된 URL형식 걸러내기 if (!(url.Contains("http://")) || (url.Replace("http://", string.Empty).Length == 0)) { return; } if (ConnDic[url] != null) { ConnDic[url].Dispose(); ConnDic.Remove(url); } ActiveDBKeyList.Remove(url); }
internal void AddDBConnection(ConnectionVO connVO) { //잘못된 URL형식 걸러내기 if (!(connVO.ServiceURL.Contains("http://")) || (connVO.ServiceURL.Replace("http://", string.Empty).Length == 0)) { return; } try { IDBService DBModel = new PostgresSQLDBServicecs(connVO); ConnDic.Add(connVO.ServiceURL, DBModel); ActiveDBKeyList.Add(connVO.ServiceURL); } catch (Exception ex) { LogController.getInstance().WriteLogFile(ex.Message); } }
private DBController(IList <ConnectionVO> connInfoList) { LoadDBTools(); if (ConnDic == null) { ConnDic = new Dictionary <string, DBService>(); ActiveDBKeyList = new StringCollection(); } foreach (ConnectionVO connVO in connInfoList) { try { DBService DBModel = new DBService(connVO); ConnDic.Add(connVO.ServiceURL, DBModel); ActiveDBKeyList.Add(connVO.ServiceURL); } catch (Exception ex) { LogController.getInstance().WriteLogFile(ex.Message); continue; } } //End of Foreach } //End of ctor