System.Data.Common.DbParameterCollection.IndexOf(object)

Here are the examples of the csharp api class System.Data.Common.DbParameterCollection.IndexOf(object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

View license
public override void Remove(object value)
    {
      MySqlParameter p = (value as MySqlParameter);
      p.Collection = null;
      int index = IndexOf(p);
      items.Remove(p);

      indexHashCS.Remove(p.ParameterName);
      indexHashCI.Remove(p.ParameterName);
      AdjustHashes(index, false);
    }

2. Example

View license
public override int Add(object value)
    {
      MySqlParameter parameter = value as MySqlParameter;
      if (parameter == null)
        throw new MySqlException("Only MySqlParameter objects may be stored");

      parameter = Add(parameter);
      return IndexOf(parameter);
    }