CosmosDbPartitionedStorage.ReadAsync(String[], CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reads one or more items with matching keys from the Cosmos DB container.
public System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<string,object>> ReadAsync (string[] keys, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadAsync : string[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<string, obj>>
override this.ReadAsync : string[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IDictionary<string, obj>>
Public Function ReadAsync (keys As String(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IDictionary(Of String, Object))
Parameters
- keys
- String[]
A collection of Ids for each item to be retrieved.
- cancellationToken
- CancellationToken
The CancellationToken.
Returns
A dictionary containing the retrieved items.
Implements
Exceptions
Exception thrown if the array of keys (Ids for the items to be retrieved) is null.