Skip to content

Instantly share code, notes, and snippets.

@maiconcp
Created May 1, 2019 19:38
Show Gist options
  • Save maiconcp/cf3c584dc49ee507253bccae12fce84c to your computer and use it in GitHub Desktop.
Save maiconcp/cf3c584dc49ee507253bccae12fce84c to your computer and use it in GitHub Desktop.
public class Client
{
private readonly ProductService _productService;
public Client()
{
_productService = new ProductService();
}
private string Call()
{
try
{
return _productService.GetSample().Result;
}
catch (AggregateException ex)
{
return ex.InnerException.GetType().FullName;
}
}
public void Test_5_Calls()
{
for (int i = 1; i <= 5; i++)
{
Console.WriteLine($"Call {i}: {Call()}");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment