Partager via


Database.ReadStreamAsync(RequestOptions, CancellationToken) Méthode

Définition

Lit un DatabaseProperties à partir du service Azure Cosmos en tant qu’opération asynchrone.

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)

Paramètres

requestOptions
RequestOptions

(Facultatif) Options de la demande.

cancellationToken
CancellationToken

(Facultatif) CancellationToken représentant l’annulation de la demande.

Retours

Task contenant un ResponseMessage contenant l’enregistrement de ressource de lecture.

Exemples

// 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();

S’applique à