C# Класс Npgsql.NpgsqlParameterCollection

Наследование: System.MarshalByRefObject, IDataParameterCollection
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Add Npgsql.NpgsqlParameter
CheckType void
InvalidateHashLookups void
NpgsqlParameterCollection System
this Npgsql.NpgsqlParameter
this Npgsql.NpgsqlParameter

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Add() публичный Метод

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.
Результат Npgsql.NpgsqlParameter

Add() публичный Метод

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.
Результат Npgsql.NpgsqlParameter

Add() публичный Метод

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.
Результат Npgsql.NpgsqlParameter

Add() публичный Метод

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.
Результат Npgsql.NpgsqlParameter

Add() публичный Метод

Adds the specified NpgsqlParameter object to the NpgsqlParameterCollection.
public Add ( object value ) : int
value object The NpgsqlParameter to add to the collection.
Результат int

AddRange() публичный Метод

Add an Array of parameters to the collection.
public AddRange ( Array values ) : void
values System.Array Parameters to add.
Результат void

AddWithValue() публичный Метод

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.
Результат Npgsql.NpgsqlParameter

AddWithValue() публичный Метод

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.
Результат Npgsql.NpgsqlParameter

AddWithValue() публичный Метод

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.
Результат Npgsql.NpgsqlParameter

AddWithValue() публичный Метод

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.
Результат Npgsql.NpgsqlParameter

Clear() публичный Метод

Removes all items from the collection.
public Clear ( ) : void
Результат void

Contains() публичный Метод

Report whether the specified parameter is present in the collection.
public Contains ( Npgsql.NpgsqlParameter item ) : bool
item Npgsql.NpgsqlParameter Parameter to find.
Результат bool

Contains() публичный Метод

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.
Результат bool

Contains() публичный Метод

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.
Результат bool

CopyTo() публичный Метод

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.
Результат void

CopyTo() публичный Метод

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.
Результат void

GetEnumerator() публичный Метод

Returns an enumerator that can iterate through the collection.
public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

GetParameter() защищенный Метод

Get parameter.
protected GetParameter ( int index ) : DbParameter
index int
Результат DbParameter

GetParameter() защищенный Метод

Get parameter.
protected GetParameter ( string parameterName ) : DbParameter
parameterName string
Результат DbParameter

IndexOf() публичный Метод

Report the offset within the collection of the given parameter.
public IndexOf ( Npgsql.NpgsqlParameter item ) : int
item Npgsql.NpgsqlParameter Parameter to find.
Результат int

IndexOf() публичный Метод

Gets the location of a NpgsqlParameter in the collection.
public IndexOf ( object value ) : int
value object The value of the NpgsqlParameter object to find.
Результат int

IndexOf() публичный Метод

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.
Результат int

Insert() публичный Метод

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.
Результат void

Insert() публичный Метод

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.
Результат void

Remove() публичный Метод

Remove the specified parameter from the collection.
public Remove ( Npgsql.NpgsqlParameter item ) : bool
item Npgsql.NpgsqlParameter Parameter to remove.
Результат bool

Remove() публичный Метод

Removes the specified NpgsqlParameter from the collection.
public Remove ( object oValue ) : void
oValue object The NpgsqlParameter to remove from the collection.
Результат void

Remove() публичный Метод

Removes the specified NpgsqlParameter from the collection.
public Remove ( string parameterName ) : void
parameterName string The name of the NpgsqlParameter to remove from the collection.
Результат void

RemoveAt() публичный Метод

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.
Результат void

RemoveAt() публичный Метод

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.
Результат void

SetParameter() защищенный Метод

Set parameter.
protected SetParameter ( int index, DbParameter value ) : void
index int
value DbParameter
Результат void

SetParameter() защищенный Метод

Set parameter.
protected SetParameter ( string parameterName, DbParameter value ) : void
parameterName string
value DbParameter
Результат void

ToArray() публичный Метод

Convert collection to a System.Array.
public ToArray ( ) : Npgsql.NpgsqlParameter[]
Результат Npgsql.NpgsqlParameter[]

TryGetValue() публичный Метод

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.
Результат bool