Compartir a través de


Database.ReadStreamAsync(RequestOptions, CancellationToken) Método

Definición

Lee un DatabaseProperties elemento del servicio Azure Cosmos como una operación asincrónica.

public abstract System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ResponseMessage> ReadStreamAsync (Microsoft.Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadStreamAsync : Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ResponseMessage>
Public MustOverride Function ReadStreamAsync (Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResponseMessage)

Parámetros

requestOptions
RequestOptions

(Opcional) Opciones de la solicitud.

cancellationToken
CancellationToken

(Opcional) CancellationToken que representa la cancelación de la solicitud.

Devoluciones

que Task contiene un ResponseMessage objeto que contiene el registro de recursos de lectura.

Ejemplos

// Reads a Database resource where database_id is the ID property of the Database resource you wish to read.
Database database = this.cosmosClient.GetDatabase(database_id);
ResponseMessage response = await database.ReadContainerStreamAsync();

Se aplica a