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 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; } }
/// <summary> /// Gets the value of a column in its native format. /// </summary> public Object this [Int32 i] { get { NpgsqlEventLog.LogIndexerGet(LogLevel.Debug, CLASSNAME, i); return(GetValue(i)); } }
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; } }
/// <summary> /// Provide access to the fields in this row. /// </summary> public virtual Object this[Int32 index] { get { NpgsqlEventLog.LogIndexerGet(LogLevel.Debug, CLASSNAME, index); if ((index < 0) || (index >= row_desc.NumFields)) { throw new IndexOutOfRangeException("this[] index value"); } return(data[index]); } }
/// <summary> /// Gets the value of a column in its native format. /// </summary> public Object this [String name] { get { NpgsqlEventLog.LogIndexerGet(LogLevel.Debug, CLASSNAME, name); Int32 fieldIndex = _currentResultset.RowDescription.FieldIndex(name); if (fieldIndex == -1) { throw new IndexOutOfRangeException("Field not found"); } return(GetValue(fieldIndex)); } }