I have 2 different async method with different return types. I want to check the connection availability globally between service call. But i don't want to check that in each method
method 1:
public async void method1()
{
   using (HttpClient client = new HttpClient()
   {
      HttpResponseMessage res = await client.GetAsync("url");
   }
}
method 2:
public async void method2()
{
   using (HttpClient client = new HttpClient()
   {
      HttpResponseMessage res = await client.GetAsync("url");
   }
}
thanks in advance
dinesh
 
     
     
     
    