C# Class Npgsql.NpgsqlParameterCollection

Inheritance: System.MarshalByRefObject, IDataParameterCollection
Afficher le fichier Open project: undeadlabs/Npgsql Class Usage Examples

Private Properties

Свойство Type Description
Add Npgsql.NpgsqlParameter
CheckType void
InvalidateHashLookups void
NpgsqlParameterCollection System
this Npgsql.NpgsqlParameter
this Npgsql.NpgsqlParameter

Méthodes publiques

Méthode Description
Add ( Npgsql.NpgsqlParameter value ) : Npgsql.NpgsqlParameter

Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection.

Add ( string parameterName, NpgsqlDbType parameterType ) : Npgsql.NpgsqlParameter

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type.

Add ( string parameterName, NpgsqlDbType parameterType, int size ) : Npgsql.NpgsqlParameter

Adds a NpgsqlParameter to the NpgsqlParameterCollection with the parameter name, the data type, and the column length.

Add ( string parameterName, NpgsqlDbType parameterType, int size, string sourceColumn ) : Npgsql.NpgsqlParameter

Adds a NpgsqlParameter to the NpgsqlParameterCollection with the parameter name, the data type, the column length, and the source column name.

Add ( object value ) : int

Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection.

AddRange ( Array values ) : void

Add an Array of parameters to the collection.

AddWithValue ( string parameterName, NpgsqlDbType parameterType, int size, object value ) : Npgsql.NpgsqlParameter

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value.

AddWithValue ( string parameterName, NpgsqlDbType parameterType, int size, string sourceColumn, object value ) : Npgsql.NpgsqlParameter

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value.

AddWithValue ( string parameterName, NpgsqlDbType parameterType, object value ) : Npgsql.NpgsqlParameter

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value.

AddWithValue ( string parameterName, object value ) : Npgsql.NpgsqlParameter

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value.

Clear ( ) : void

Removes all items from the collection.

Contains ( Npgsql.NpgsqlParameter item ) : bool

Report whether the specified parameter is present in the collection.

Contains ( object value ) : bool

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

Contains ( string parameterName ) : bool

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

CopyTo ( Array array, int index ) : void

Copies NpgsqlParameter objects from the NpgsqlParameterCollection to the specified array.

CopyTo ( Npgsql.NpgsqlParameter array, int arrayIndex ) : void

Convert collection to a System.Array.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that can iterate through the collection.

IndexOf ( Npgsql.NpgsqlParameter item ) : int

Report the offset within the collection of the given parameter.

IndexOf ( object value ) : int

Gets the location of a NpgsqlParameter in the collection.

IndexOf ( string parameterName ) : int

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

Insert ( int index, Npgsql.NpgsqlParameter item ) : void

Insert the specified parameter into the collection.

Insert ( int index, object oValue ) : void

Inserts a NpgsqlParameter into the collection at the specified index.

Remove ( Npgsql.NpgsqlParameter item ) : bool

Remove the specified parameter from the collection.

Remove ( object oValue ) : void

Removes the specified NpgsqlParameter from the collection.

Remove ( string parameterName ) : void

Removes the specified NpgsqlParameter from the collection.

RemoveAt ( int index ) : void

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

RemoveAt ( string parameterName ) : void

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

ToArray ( ) : Npgsql.NpgsqlParameter[]

Convert collection to a System.Array.

TryGetValue ( string parameterName, Npgsql.NpgsqlParameter &parameter ) : bool

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

Méthodes protégées

Méthode Description
GetParameter ( int index ) : DbParameter

Get parameter.

GetParameter ( string parameterName ) : DbParameter

Get parameter.

SetParameter ( int index, DbParameter value ) : void

Set parameter.

SetParameter ( string parameterName, DbParameter value ) : void

Set parameter.

Private Methods

Méthode Description
Add ( string parameterName, object value ) : Npgsql.NpgsqlParameter
CheckType ( object Object ) : void

In methods taking an object as argument this method is used to verify that the argument has the type NpgsqlParameter

InvalidateHashLookups ( ) : void

Invalidate the hash lookup tables. This should be done any time a change may throw the lookups out of sync with the list.

NpgsqlParameterCollection ( ) : System

Initializes a new instance of the NpgsqlParameterCollection class.

this ( int index ) : Npgsql.NpgsqlParameter
this ( string parameterName ) : Npgsql.NpgsqlParameter

Method Details

Add() public méthode

Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection.
public Add ( Npgsql.NpgsqlParameter value ) : Npgsql.NpgsqlParameter
value Npgsql.NpgsqlParameter The NpgsqlParameter to add to the collection.
Résultat Npgsql.NpgsqlParameter

Add() public méthode

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the parameter name and the data type.
public Add ( string parameterName, NpgsqlDbType parameterType ) : Npgsql.NpgsqlParameter
parameterName string The name of the parameter.
parameterType NpgsqlDbType One of the DbType values.
Résultat Npgsql.NpgsqlParameter

Add() public méthode

Adds a NpgsqlParameter to the NpgsqlParameterCollection with the parameter name, the data type, and the column length.
public Add ( string parameterName, NpgsqlDbType parameterType, int size ) : Npgsql.NpgsqlParameter
parameterName string The name of the parameter.
parameterType NpgsqlDbType One of the DbType values.
size int The length of the column.
Résultat Npgsql.NpgsqlParameter

Add() public méthode

Adds a NpgsqlParameter to the NpgsqlParameterCollection with the parameter name, the data type, the column length, and the source column name.
public Add ( string parameterName, NpgsqlDbType parameterType, int size, string sourceColumn ) : Npgsql.NpgsqlParameter
parameterName string The name of the parameter.
parameterType NpgsqlDbType One of the DbType values.
size int The length of the column.
sourceColumn string The name of the source column.
Résultat Npgsql.NpgsqlParameter

Add() public méthode

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

AddRange() public méthode

Add an Array of parameters to the collection.
public AddRange ( Array values ) : void
values System.Array Parameters to add.
Résultat void

AddWithValue() public méthode

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value.
public AddWithValue ( string parameterName, NpgsqlDbType parameterType, int size, object value ) : Npgsql.NpgsqlParameter
parameterName string The name of the NpgsqlParameter.
parameterType NpgsqlDbType One of the NpgsqlDbType values.
size int The length of the column.
value object The Value of the NpgsqlParameter to add to the collection.
Résultat Npgsql.NpgsqlParameter

AddWithValue() public méthode

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value.
public AddWithValue ( string parameterName, NpgsqlDbType parameterType, int size, string sourceColumn, object value ) : Npgsql.NpgsqlParameter
parameterName string The name of the NpgsqlParameter.
parameterType NpgsqlDbType One of the NpgsqlDbType values.
size int The length of the column.
sourceColumn string The name of the source column.
value object The Value of the NpgsqlParameter to add to the collection.
Résultat Npgsql.NpgsqlParameter

AddWithValue() public méthode

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value.
public AddWithValue ( string parameterName, NpgsqlDbType parameterType, object value ) : Npgsql.NpgsqlParameter
parameterName string The name of the NpgsqlParameter.
parameterType NpgsqlDbType One of the NpgsqlDbType values.
value object The Value of the NpgsqlParameter to add to the collection.
Résultat Npgsql.NpgsqlParameter

AddWithValue() public méthode

Adds a NpgsqlParameter to the NpgsqlParameterCollection given the specified parameter name and value.
public AddWithValue ( string parameterName, object value ) : Npgsql.NpgsqlParameter
parameterName string The name of the NpgsqlParameter.
value object The Value of the NpgsqlParameter to add to the collection.
Résultat Npgsql.NpgsqlParameter

Clear() public méthode

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

Contains() public méthode

Report whether the specified parameter is present in the collection.
public Contains ( Npgsql.NpgsqlParameter item ) : bool
item Npgsql.NpgsqlParameter Parameter to find.
Résultat bool

Contains() public méthode

Gets a value indicating whether a NpgsqlParameter exists in the collection.
public Contains ( object value ) : bool
value object The value of the NpgsqlParameter object to find.
Résultat bool

Contains() public méthode

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

CopyTo() public méthode

Copies NpgsqlParameter objects from the NpgsqlParameterCollection to the specified array.
public CopyTo ( Array array, int index ) : void
array System.Array An Array to which to copy the NpgsqlParameter objects in the collection.
index int The starting index of the array.
Résultat void

CopyTo() public méthode

Convert collection to a System.Array.
public CopyTo ( Npgsql.NpgsqlParameter array, int arrayIndex ) : void
array Npgsql.NpgsqlParameter Destination array.
arrayIndex int Starting index in destination array.
Résultat void

GetEnumerator() public méthode

Returns an enumerator that can iterate through the collection.
public GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

GetParameter() protected méthode

Get parameter.
protected GetParameter ( int index ) : DbParameter
index int
Résultat DbParameter

GetParameter() protected méthode

Get parameter.
protected GetParameter ( string parameterName ) : DbParameter
parameterName string
Résultat DbParameter

IndexOf() public méthode

Report the offset within the collection of the given parameter.
public IndexOf ( Npgsql.NpgsqlParameter item ) : int
item Npgsql.NpgsqlParameter Parameter to find.
Résultat int

IndexOf() public méthode

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

IndexOf() public méthode

Gets the location of the NpgsqlParameter in the collection with a specific parameter name.
public IndexOf ( string parameterName ) : int
parameterName string The name of the NpgsqlParameter object to find.
Résultat int

Insert() public méthode

Insert the specified parameter into the collection.
public Insert ( int index, Npgsql.NpgsqlParameter item ) : void
index int Index of the existing parameter before which to insert the new one.
item Npgsql.NpgsqlParameter Parameter to insert.
Résultat void

Insert() public méthode

Inserts a NpgsqlParameter into the collection at the specified index.
public Insert ( int index, object oValue ) : void
index int The zero-based index where the parameter is to be inserted within the collection.
oValue object The NpgsqlParameter to add to the collection.
Résultat void

Remove() public méthode

Remove the specified parameter from the collection.
public Remove ( Npgsql.NpgsqlParameter item ) : bool
item Npgsql.NpgsqlParameter Parameter to remove.
Résultat bool

Remove() public méthode

Removes the specified NpgsqlParameter from the collection.
public Remove ( object oValue ) : void
oValue object The NpgsqlParameter to remove from the collection.
Résultat void

Remove() public méthode

Removes the specified NpgsqlParameter from the collection.
public Remove ( string parameterName ) : void
parameterName string The name of the NpgsqlParameter to remove from the collection.
Résultat void

RemoveAt() public méthode

Removes the specified NpgsqlParameter 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 NpgsqlParameter from the collection using the parameter name.
public RemoveAt ( string parameterName ) : void
parameterName string The name of the NpgsqlParameter object to retrieve.
Résultat void

SetParameter() protected méthode

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

SetParameter() protected méthode

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

ToArray() public méthode

Convert collection to a System.Array.
public ToArray ( ) : Npgsql.NpgsqlParameter[]
Résultat Npgsql.NpgsqlParameter[]

TryGetValue() public méthode

Gets a value indicating whether a NpgsqlParameter with the specified parameter name exists in the collection.
public TryGetValue ( string parameterName, Npgsql.NpgsqlParameter &parameter ) : bool
parameterName string The name of the NpgsqlParameter object to find.
parameter Npgsql.NpgsqlParameter A reference to the requested parameter is returned in this out param if it is found in the list. This value is null if the parameter is not found.
Résultat bool