public void Remove(HKHConnectionStringElement element) { if (base.BaseIndexOf(element) >= 0) { base.BaseRemove(element.Key); } }
static DataBaseConfigurationManager() { _connectionStrings = (HKHConnectionStringsSection)ConfigurationManager.GetSection(HKHConnectionStringsSection.TagName); if (_connectionStrings.ConnectionStrings.Count > 0) { foreach (HKHConnectionStringElement config in _connectionStrings.ConnectionStrings) { if (config.IsDefault) { _defaultConnectionString = config; break; } } //set the first one is default if no any config is marked as defaut explicitly. if (_defaultConnectionString == null) { _defaultConnectionString = _connectionStrings.ConnectionStrings[0]; //_defaultConnectionString.IsDefault = true; } } else { throw new HKH.Data.DataBaseConfigurationException("No availiable connectionstring!"); } }
public void BaseAdd(int index, HKHConnectionStringElement element) { if (index == -1) { base.BaseAdd(element, false); } else { base.BaseAdd(index, element); } }
public int IndexOf(HKHConnectionStringElement element) { return(base.BaseIndexOf(element)); }
public void Add(HKHConnectionStringElement element) { this.BaseAdd(element); }