Table of Contents

Class SqlParameterCollection

Namespace
Microsoft.Azure.Documents
Assembly
Microsoft.Azure.Documents.Client.dll

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

parameters IEnumerable<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

index int

The 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

item SqlParameter

The 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

item SqlParameter

The 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

array SqlParameter[]

The array to copy into.

arrayIndex int

The 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

item SqlParameter

The 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

index int

The location in the index array in which to start inserting elements.

item SqlParameter

The 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

item SqlParameter

The 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

index int

The location in the index where the item will be removed from.