public new NpgsqlParameter this[int index] { get { NpgsqlEventLog.LogIndexerGet(LogLevel.Debug, CLASSNAME, index); return(this.InternalList[index]); } set { NpgsqlEventLog.LogIndexerSet(LogLevel.Debug, CLASSNAME, index, value); NpgsqlParameter oldValue = this.InternalList[index]; if (oldValue == value) { // Reasigning the same value is a non-op. return; } if (value.Collection != null) { throw new InvalidOperationException("The parameter already belongs to a collection"); } if (value.CleanName != oldValue.CleanName) { InvalidateHashLookups(); } this.InternalList[index] = value; value.Collection = this; oldValue.Collection = null; } }
public new NpgsqlParameter this[string parameterName] { get { NpgsqlEventLog.LogIndexerGet(LogLevel.Debug, CLASSNAME, parameterName); int index = IndexOf(parameterName); if (index == -1) { throw new IndexOutOfRangeException("Parameter not found"); } return(this.InternalList[index]); } set { NpgsqlEventLog.LogIndexerSet(LogLevel.Debug, CLASSNAME, parameterName, value); int index = IndexOf(parameterName); if (index == -1) { throw new IndexOutOfRangeException("Parameter not found"); } NpgsqlParameter oldValue = this.InternalList[index]; if (value.CleanName != oldValue.CleanName) { InvalidateHashLookups(); } this.InternalList[index] = value; } }
public NpgsqlParameter this[string parameterName] { get { NpgsqlEventLog.LogIndexerGet(LogLevel.Debug, CLASSNAME, parameterName); return((NpgsqlParameter)this.InternalList[IndexOf(parameterName)]); } set { NpgsqlEventLog.LogIndexerSet(LogLevel.Debug, CLASSNAME, parameterName, value); this.InternalList[IndexOf(parameterName)] = value; } }
public NpgsqlParameter this[int index] { get { NpgsqlEventLog.LogIndexerGet(LogLevel.Debug, CLASSNAME, index); return((NpgsqlParameter)this.InternalList[index]); } set { NpgsqlEventLog.LogIndexerSet(LogLevel.Debug, CLASSNAME, index, value); this.InternalList[index] = value; } }
object System.Collections.IList.this[int index] { get { NpgsqlEventLog.LogIndexerGet(LogLevel.Debug, CLASSNAME, index); return((NpgsqlParameter)this.InternalList[index]); } set { NpgsqlEventLog.LogIndexerSet(LogLevel.Debug, CLASSNAME, index, value); CheckType(value); this.InternalList[index] = value; } }
object System.Data.IDataParameterCollection.this[string parameterName] { get { NpgsqlEventLog.LogIndexerGet(LogLevel.Debug, CLASSNAME, parameterName); return(this.InternalList[IndexOf(parameterName)]); } set { NpgsqlEventLog.LogIndexerSet(LogLevel.Debug, CLASSNAME, parameterName, value); CheckType(value); this.InternalList[IndexOf(parameterName)] = value; } }