public virtual object this[string keyword] { get { ADP.CheckArgumentNull(keyword, "keyword"); object value; if (CurrentValues.TryGetValue(keyword, out value)) { return(value); } throw ADP.KeywordNotSupported(keyword); } set { ADP.CheckArgumentNull(keyword, "keyword"); if (null != value) { string keyvalue = DbConnectionStringBuilderUtil.ConvertToString(value); DbConnectionOptions.ValidateKeyValuePair(keyword, keyvalue); // store keyword/value pair CurrentValues[keyword] = keyvalue; } _connectionString = null; } }
public virtual object this[string keyword] { get { Bid.Trace("<comm.DbConnectionStringBuilder.get_Item|API> %d#, keyword='%ls'\n", ObjectID, keyword); ADP.CheckArgumentNull(keyword, "keyword"); object value; if (CurrentValues.TryGetValue(keyword, out value)) { return(value); } throw ADP.KeywordNotSupported(keyword); } set { ADP.CheckArgumentNull(keyword, "keyword"); bool flag = false; if (null != value) { string keyvalue = DbConnectionStringBuilderUtil.ConvertToString(value); DbConnectionOptions.ValidateKeyValuePair(keyword, keyvalue); flag = CurrentValues.ContainsKey(keyword); // store keyword/value pair CurrentValues[keyword] = keyvalue; } else { flag = Remove(keyword); } _connectionString = null; if (flag) { _propertyDescriptors = null; } } }
public virtual object this[string keyword] { get { object obj2; Bid.Trace("<comm.DbConnectionStringBuilder.get_Item|API> %d#, keyword='%ls'\n", this.ObjectID, keyword); ADP.CheckArgumentNull(keyword, "keyword"); if (!this.CurrentValues.TryGetValue(keyword, out obj2)) { throw ADP.KeywordNotSupported(keyword); } return(obj2); } set { ADP.CheckArgumentNull(keyword, "keyword"); bool flag = false; if (value != null) { string str = DbConnectionStringBuilderUtil.ConvertToString(value); DbConnectionOptions.ValidateKeyValuePair(keyword, str); flag = this.CurrentValues.ContainsKey(keyword); this.CurrentValues[keyword] = str; } else { flag = this.Remove(keyword); } this._connectionString = null; if (flag) { this._propertyDescriptors = null; } } }