Ejemplo n.º 1
0
        internal override async Task <ThroughputResponse> ReplaceThroughputIfExistsAsync(
            ThroughputProperties throughput,
            RequestOptions requestOptions       = null,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            string rid = await this.GetRIDAsync(cancellationToken);

            CosmosOffers cosmosOffers = new CosmosOffers(this.ClientContext);

            return(await cosmosOffers.ReplaceThroughputPropertiesIfExistsAsync(
                       targetRID : rid,
                       throughputProperties : throughput,
                       requestOptions : requestOptions,
                       cancellationToken : cancellationToken));
        }
Ejemplo n.º 2
0
        public Task <ThroughputResponse> ReplaceThroughputIfExistsAsync(
            ThroughputProperties throughput,
            ITrace trace,
            RequestOptions requestOptions       = null,
            CancellationToken cancellationToken = default)
        {
            CosmosOffers cosmosOffers = new CosmosOffers(this.ClientContext);

            return(this.OfferRetryHelperForStaleRidCacheAsync(
                       (rid) => cosmosOffers.ReplaceThroughputPropertiesIfExistsAsync(
                           targetRID: rid,
                           throughputProperties: throughput,
                           requestOptions: requestOptions,
                           cancellationToken: cancellationToken),
                       trace,
                       cancellationToken));
        }