예제 #1
0
 public void Remove(ConnectionElement url)
 {
     if (BaseIndexOf(url) >= 0)
     {
         BaseRemove(url.Name);
     }
 }
예제 #2
0
        public static IConnectinContext GetConnection(DB db)
        {
            if ((int)db > Config.Connections.Count)
            {
                throw new PeanutException(string.Format(DataMsg.DATABASE_SETTING_NOTFOUND, db));
            }
            ConnectionElement ce     = Config.Connections[(int)db];
            IDriver           driver = ce.Driver;

            if (driver == null)
            {
                throw new PeanutException(string.Format(DataMsg.DATABASE_SETTING_NOTFOUND, ce.Name));
            }
            return(new ConnectionContext(ce.ConnectionString, driver, db));
        }
예제 #3
0
 public void Add(ConnectionElement url)
 {
     BaseAdd(url);
 }
예제 #4
0
 public int IndexOf(ConnectionElement url)
 {
     return(BaseIndexOf(url));
 }