Beispiel #1
0
 public clsGeneralSetting.DataBaseSettings AddDB(string pName)
 {
     //if (this.DBExists(pName))
     //{
     //    return null;
     //}
     clsGeneralSetting.DataBaseSettings dataBaseSetting = new clsGeneralSetting.DataBaseSettings(pName);
     this._SETTINGS.Add(this.DBCount, dataBaseSetting);
     return(dataBaseSetting);
 }
Beispiel #2
0
        public clsGeneralSetting.DataBaseSettings DBItem(object index)
        {
            if (!(index is string))
            {
                return((clsGeneralSetting.DataBaseSettings) this._SETTINGS[RuntimeHelpers.GetObjectValue(index)]);
            }
            int dBCount = checked (this.DBCount - 1);

            for (int i = 0; i <= dBCount; i = checked (i + 1))
            {
                clsGeneralSetting.DataBaseSettings dataBaseSettings = (clsGeneralSetting.DataBaseSettings) this._SETTINGS[RuntimeHelpers.GetObjectValue(index)];
                if (Operators.CompareString(dataBaseSettings.name, index.ToString(), false) == 0)
                {
                    return(dataBaseSettings);
                }
            }
            return(null);
        }