C# Class MySql.Data.MySqlClient.MySqlParameterCollection

Inheritance: DbParameterCollection
Mostra file Open project: Top-Cat/SteamBot Class Usage Examples

Public Methods

Method Description
Add ( MySqlParameter value ) : MySqlParameter

Adds the specified MySqlParameter object to the MySqlParameterCollection.

Add ( string parameterName, MySqlDbType dbType ) : MySqlParameter

Adds a MySqlParameter to the MySqlParameterCollection given the parameter name and the data type.

Add ( string parameterName, MySqlDbType dbType, int size ) : MySqlParameter

Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, and the column length.

Add ( string parameterName, MySqlDbType dbType, int size, string sourceColumn ) : MySqlParameter

Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, the column length, and the source column name.

Add ( object value ) : int

Adds the specified MySqlParameter object to the MySqlParameterCollection.

AddRange ( Array values ) : void

Adds an array of values to the end of the MySqlParameterCollection.

AddWithValue ( string parameterName, object value ) : MySqlParameter
Clear ( ) : void

Removes all items from the collection.

Contains ( object value ) : bool

Gets a value indicating whether a MySqlParameter exists in the collection.

Contains ( string parameterName ) : bool

Gets a value indicating whether a MySqlParameter with the specified parameter name exists in the collection.

CopyTo ( Array array, int index ) : void

Copies MySqlParameter objects from the MySqlParameterCollection to the specified array.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that iterates through the MySqlParameterCollection.

IndexOf ( object value ) : int

Gets the location of a MySqlParameter in the collection.

IndexOf ( string parameterName ) : int

Gets the location of the MySqlParameter in the collection with a specific parameter name.

Insert ( int index, object value ) : void

Inserts a MySqlParameter into the collection at the specified index.

Remove ( object value ) : void

Removes the specified MySqlParameter from the collection.

RemoveAt ( int index ) : void

Removes the specified MySqlParameter from the collection using a specific index.

RemoveAt ( string parameterName ) : void

Removes the specified MySqlParameter from the collection using the parameter name.

this ( int index ) : MySqlParameter

Gets the MySqlParameter at the specified index.

this ( string name ) : MySqlParameter

Gets the MySqlParameter with the specified name.

Protected Methods

Method Description
GetParameter ( int index ) : DbParameter
GetParameter ( string parameterName ) : DbParameter

Retrieve the parameter with the given name.

SetParameter ( int index, DbParameter value ) : void
SetParameter ( string parameterName, DbParameter value ) : void

Private Methods

Method Description
Add ( string parameterName, object value ) : MySqlParameter
AdjustHash ( Hashtable hash, string parameterName, int keyIndex, bool addEntry ) : void
AdjustHashes ( int keyIndex, bool addEntry ) : void

This method will update all the items in the index hashes when we insert a parameter somewhere in the middle

CheckIndex ( int index ) : void
GetNextIndex ( ) : int
GetParameterFlexible ( string parameterName, bool throwOnNotFound ) : MySqlParameter
GetParameterFlexibleInternal ( string baseName ) : MySqlParameter
InternalAdd ( MySqlParameter value, int index ) : MySqlParameter
MySqlParameterCollection ( MySqlCommand cmd ) : System
ParameterNameChanged ( MySqlParameter p, string oldName, string newName ) : void

Method Details

Add() public method

Adds the specified MySqlParameter object to the MySqlParameterCollection.
public Add ( MySqlParameter value ) : MySqlParameter
value MySqlParameter The to add to the collection.
return MySqlParameter

Add() public method

Adds a MySqlParameter to the MySqlParameterCollection given the parameter name and the data type.
public Add ( string parameterName, MySqlDbType dbType ) : MySqlParameter
parameterName string The name of the parameter.
dbType MySqlDbType One of the values.
return MySqlParameter

Add() public method

Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, and the column length.
public Add ( string parameterName, MySqlDbType dbType, int size ) : MySqlParameter
parameterName string The name of the parameter.
dbType MySqlDbType One of the values.
size int The length of the column.
return MySqlParameter

Add() public method

Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, the column length, and the source column name.
public Add ( string parameterName, MySqlDbType dbType, int size, string sourceColumn ) : MySqlParameter
parameterName string The name of the parameter.
dbType MySqlDbType One of the values.
size int The length of the column.
sourceColumn string The name of the source column.
return MySqlParameter

Add() public method

Adds the specified MySqlParameter object to the MySqlParameterCollection.
public Add ( object value ) : int
value object The to add to the collection.
return int

AddRange() public method

Adds an array of values to the end of the MySqlParameterCollection.
public AddRange ( Array values ) : void
values System.Array
return void

AddWithValue() public method

public AddWithValue ( string parameterName, object value ) : MySqlParameter
parameterName string
value object
return MySqlParameter

Clear() public method

Removes all items from the collection.
public Clear ( ) : void
return void

Contains() public method

Gets a value indicating whether a MySqlParameter exists in the collection.
public Contains ( object value ) : bool
value object The value of the object to find.
return bool

Contains() public method

Gets a value indicating whether a MySqlParameter with the specified parameter name exists in the collection.
public Contains ( string parameterName ) : bool
parameterName string The name of the object to find.
return bool

CopyTo() public method

Copies MySqlParameter objects from the MySqlParameterCollection to the specified array.
public CopyTo ( Array array, int index ) : void
array System.Array
index int
return void

GetEnumerator() public method

Returns an enumerator that iterates through the MySqlParameterCollection.
public GetEnumerator ( ) : IEnumerator
return IEnumerator

GetParameter() protected method

protected GetParameter ( int index ) : DbParameter
index int
return DbParameter

GetParameter() protected method

Retrieve the parameter with the given name.
protected GetParameter ( string parameterName ) : DbParameter
parameterName string
return DbParameter

IndexOf() public method

Gets the location of a MySqlParameter in the collection.
public IndexOf ( object value ) : int
value object The object to locate.
return int

IndexOf() public method

Gets the location of the MySqlParameter in the collection with a specific parameter name.
public IndexOf ( string parameterName ) : int
parameterName string The name of the object to retrieve.
return int

Insert() public method

Inserts a MySqlParameter into the collection at the specified index.
public Insert ( int index, object value ) : void
index int
value object
return void

Remove() public method

Removes the specified MySqlParameter from the collection.
public Remove ( object value ) : void
value object
return void

RemoveAt() public method

Removes the specified MySqlParameter from the collection using a specific index.
public RemoveAt ( int index ) : void
index int The zero-based index of the parameter.
return void

RemoveAt() public method

Removes the specified MySqlParameter from the collection using the parameter name.
public RemoveAt ( string parameterName ) : void
parameterName string The name of the object to retrieve.
return void

SetParameter() protected method

protected SetParameter ( int index, DbParameter value ) : void
index int
value DbParameter
return void

SetParameter() protected method

protected SetParameter ( string parameterName, DbParameter value ) : void
parameterName string
value DbParameter
return void

this() public method

Gets the MySqlParameter at the specified index.
public this ( int index ) : MySqlParameter
index int
return MySqlParameter

this() public method

Gets the MySqlParameter with the specified name.
public this ( string name ) : MySqlParameter
name string
return MySqlParameter