Ejemplo n.º 1
0
 internal void Dispose(string url)
 {
     if (ConnDic[url] != null)
     {
         ConnDic[url].Dispose();
     }
     ConnDic.Remove(url);
     ActiveDBKeyList.Remove(url);
 }
Ejemplo n.º 2
0
 internal void Dispose()
 {
     foreach (var key in ConnDic.Keys)
     {
         if (ConnDic[key] != null)
         {
             ConnDic[key].Dispose();
         }
     }
     ActiveDBKeyList.Clear();
     ConnDic.Clear();
     this.ActiveDBKeyList = new StringCollection();
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
 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