internal async Task <ThroughputResponse> ReadThroughputIfExistsAsync(
            RequestOptions requestOptions,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            string rid = await this.GetRIDAsync(cancellationToken);

            CosmosOffers cosmosOffers = new CosmosOffers(this.ClientContext);

            return(await cosmosOffers.ReadThroughputIfExistsAsync(targetRID : rid, requestOptions : requestOptions, cancellationToken : cancellationToken));
        }
Esempio n. 2
0
        public async Task <ThroughputResponse> ReadThroughputIfExistsAsync(
            CosmosDiagnosticsContext diagnosticsContext,
            RequestOptions requestOptions,
            CancellationToken cancellationToken = default)
        {
            string rid = await this.GetRIDAsync(cancellationToken);

            CosmosOffers cosmosOffers = new CosmosOffers(this.ClientContext);

            return(await cosmosOffers.ReadThroughputIfExistsAsync(rid, requestOptions, cancellationToken));
        }
Esempio n. 3
0
        public Task <ThroughputResponse> ReadThroughputIfExistsAsync(
            RequestOptions requestOptions,
            ITrace trace,
            CancellationToken cancellationToken = default)
        {
            CosmosOffers cosmosOffers = new CosmosOffers(this.ClientContext);

            return(this.OfferRetryHelperForStaleRidCacheAsync(
                       (rid) => cosmosOffers.ReadThroughputIfExistsAsync(rid, requestOptions, cancellationToken),
                       trace,
                       cancellationToken));
        }