Class SqlParameterCollection
Represents a collection of parameters associated with SqlQuerySpec for use in the Azure Cosmos DB service.
public sealed class SqlParameterCollection : IList<SqlParameter>, ICollection<SqlParameter>, IEnumerable<SqlParameter>, IEnumerable
- Inheritance
-
SqlParameterCollection
- Implements
- Inherited Members
- Extension Methods
Constructors
SqlParameterCollection()
Initialize a new instance of the SqlParameterCollection class for the Azure Cosmos DB service.
public SqlParameterCollection()
SqlParameterCollection(IEnumerable<SqlParameter>)
Initializes a new instance of the SqlParameterCollection class for the Azure Cosmos DB service.
public SqlParameterCollection(IEnumerable<SqlParameter> parameters)
Parameters
parametersIEnumerable<SqlParameter>The collection of parameters.
Properties
Count
Gets the number of elements contained in the Azure Cosmos DB collection.
public int Count { get; }
Property Value
- int
The number of elements contained in the collection.
IsReadOnly
Gets a value indicating whether the Azure Cosmos DB collection is read-only.
public bool IsReadOnly { get; }
Property Value
- bool
true if the collection is read-only; otherwise, false.
this[int]
Gets or sets the element at the specified index in the Azure Cosmos DB collection.
public SqlParameter this[int index] { get; set; }
Parameters
indexintThe location in the index.
Property Value
- SqlParameter
The element at the specified index.
Methods
Add(SqlParameter)
Adds an item to the Azure Cosmos DB collection.
public void Add(SqlParameter item)
Parameters
itemSqlParameterThe item to add to the collection.
Clear()
Removes all items from the Azure Cosmos DB collection.
public void Clear()
Contains(SqlParameter)
Determines whether the Azure Cosmos DB collection contains a specific value.
public bool Contains(SqlParameter item)
Parameters
itemSqlParameterThe value to search for.
Returns
- bool
true if the collection contains a specific value; otherwise, false.
CopyTo(SqlParameter[], int)
Copies the elements of the Azure Cosmos DB collection to an Array, starting at a particular Array index.
public void CopyTo(SqlParameter[] array, int arrayIndex)
Parameters
arraySqlParameter[]The array to copy into.
arrayIndexintThe location in the index array in which to start adding elements.
GetEnumerator()
Returns an enumerator that iterates through the Azure Cosmos DB collection.
public IEnumerator<SqlParameter> GetEnumerator()
Returns
- IEnumerator<SqlParameter>
An enumerator for the collection.
IndexOf(SqlParameter)
Determines the index of a specific item in the Azure Cosmos DB collection.
public int IndexOf(SqlParameter item)
Parameters
itemSqlParameterThe item to find.
Returns
- int
The index value for the item.
Insert(int, SqlParameter)
Inserts an item at the specified index in the Azure Cosmos DB collection.
public void Insert(int index, SqlParameter item)
Parameters
indexintThe location in the index array in which to start inserting elements.
itemSqlParameterThe item to copy into the index.
Remove(SqlParameter)
/// Removes the first occurrence of a specific object from the Azure Cosmos DB collection.
public bool Remove(SqlParameter item)
Parameters
itemSqlParameterThe item to remove from the collection.
Returns
- bool
true if the first item was removed; otherwise, false.
RemoveAt(int)
Removes the item at the specified index from the Azure Cosmos DB collection.
public void RemoveAt(int index)
Parameters
indexintThe location in the index where the item will be removed from.