Community

Testing Code is not working in Abbyy.Cloudsdk.V2.Client

i am getting this issue  

namespace Abbyy.CloudSdk.V2.Client.Sample
{
	public class HttpClientRetryPolicyHandler : DelegatingHandler
	{
		private readonly IAsyncPolicy<HttpResponseMessage> _retryPolicy;

		/// <summary>Initializes a new instance of the <see cref="HttpClientRetryPolicyHandler"/> class.</summary>
		public HttpClientRetryPolicyHandler(IAsyncPolicy<HttpResponseMessage> retryPolicy)
		{

------->>>>>> Error Here _retryPolicy = retryPolicy ?? throw new ArgumentNullException(nameof(retryPolicy));
------->>>>>> Error Msg
invalid expression term 'throw'

		}

		/// <inheritdoc />
		protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellation) =>
			_retryPolicy.ExecuteAsync(ct => base.SendAsync(request, ct), cancellation);
	}
}

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.