// // 集合实现 // /// <summary> /// add方法 /// </summary> /// <param name="imp"> 提供者实例</param> public void Add(DBProvider provider) { string name = provider.ProviderName; string typename = provider.GetType().AssemblyQualifiedName; DBProviderConfigElement ele = new DBProviderConfigElement( name, typename, provider); this.Add(ele); }
// // 方法 // /// <summary> /// 增加方法 /// </summary> /// <param name="providerName"></param> /// <param name="implemementation"></param> internal void Add(string providerName, DBProvider provider) { DBProviderConfigElement ele = new DBProviderConfigElement( providerName, provider.GetType().AssemblyQualifiedName, provider); this.Providers.Add(ele); }
/// <summary> /// 获取值 /// </summary> /// <param name="providername"></param> /// <returns></returns> internal DBProvider Get(string providername) { DBProviderConfigElement ele = this.Providers.Get(providername); if (null == ele) { throw new Exception(string.Format(DbError.ProviderNameError, providername)); } return(ele.Provider); }
/// <summary> /// add 方法 /// </summary> /// <param name="element"></param> internal void Add(DBProviderConfigElement element) { this.BaseAdd(element); }