public static async Task <bool> IsHealthy <T>(IGetApiClient <T> client, IGetApiRequest request)
        {
            try
            {
                var status = await client.GetResponseCode(request);

                return(status == HttpStatusCode.OK);
            }
            catch
            {
                return(false);
            }
        }
コード例 #2
0
 public QuestionnaireService(IGetApiClient getApiClient)
 {
     _getApiClient = getApiClient;
 }
 public ReliableCacheStorageService(IGetApiClient <TConfiguration> client, ICacheStorageService cacheStorageService)
 {
     _client = client;
     _cacheStorageService = cacheStorageService;
 }
 public static Task <bool> IsHealthy <T>(IGetApiClient <T> client)
 => IsHealthy(client, new GetPingRequest());