C# Class MySql.Data.MySqlClient.MySqlParameterCollection

Inheritance: DbParameterCollection
Afficher le fichier Open project: Top-Cat/SteamBot Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

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

Add() public méthode

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.
Résultat MySqlParameter

Add() public méthode

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.
Résultat MySqlParameter

Add() public méthode

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.
Résultat MySqlParameter

Add() public méthode

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

AddRange() public méthode

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

AddWithValue() public méthode

public AddWithValue ( string parameterName, object value ) : MySqlParameter
parameterName string
value object
Résultat MySqlParameter

Clear() public méthode

Removes all items from the collection.
public Clear ( ) : void
Résultat void

Contains() public méthode

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.
Résultat bool

Contains() public méthode

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.
Résultat bool

CopyTo() public méthode

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

GetEnumerator() public méthode

Returns an enumerator that iterates through the MySqlParameterCollection.
public GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

GetParameter() protected méthode

protected GetParameter ( int index ) : DbParameter
index int
Résultat DbParameter

GetParameter() protected méthode

Retrieve the parameter with the given name.
protected GetParameter ( string parameterName ) : DbParameter
parameterName string
Résultat DbParameter

IndexOf() public méthode

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

IndexOf() public méthode

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.
Résultat int

Insert() public méthode

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

Remove() public méthode

Removes the specified MySqlParameter from the collection.
public Remove ( object value ) : void
value object
Résultat void

RemoveAt() public méthode

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.
Résultat void

RemoveAt() public méthode

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.
Résultat void

SetParameter() protected méthode

protected SetParameter ( int index, DbParameter value ) : void
index int
value DbParameter
Résultat void

SetParameter() protected méthode

protected SetParameter ( string parameterName, DbParameter value ) : void
parameterName string
value DbParameter
Résultat void

this() public méthode

Gets the MySqlParameter at the specified index.
public this ( int index ) : MySqlParameter
index int
Résultat MySqlParameter

this() public méthode

Gets the MySqlParameter with the specified name.
public this ( string name ) : MySqlParameter
name string
Résultat MySqlParameter