protected Task CreateApiDelay(IBigCommerceRateLimits limits, CancellationToken token) { return(limits.IsUnlimitedCallsCount ? Task.FromResult(0) : Task.Delay(limits.LimitTimeResetMs != -1 ? TimeSpan.FromMilliseconds(limits.LimitTimeResetMs) : this.DefaultApiDelay, token)); }
public BigCommerceResponse(T response, IBigCommerceRateLimits limits) { this.Response = response; this.Limits = limits; }
protected Task CreateApiDelay(IBigCommerceRateLimits limits) { return(this.CreateApiDelay(limits, CancellationToken.None)); }