示例#1
0
        public IHttpClient Decorate(
            IHttpClient httpClient,
            IHttpApiConfiguration httpApiConfiguration)
        {
            var httpApiWithThrottling = httpApiConfiguration as IHttpApiWithThrottling;

            if (httpApiWithThrottling is null)
            {
                return(httpClient);
            }

            return(httpClient.AddThrottling(httpApiWithThrottling, _throttleManager));
        }