Пример #1
0
 protected void Download(string url, string fileName)
 {
     _handler.Handle(() =>
     {
         _restfulClient = _restfulClient ?? new RestfulClient();
         return(_restfulClient.Download(url, fileName));
     });
 }
Пример #2
0
 protected HttpRequestClientBase(string logName,
                                 ICircuitBreakingHandler <string> handler)
     : this(logName)
 {
     _handler = handler;
     _handler.Handle <HttpRequestException>()
     .Handle <TimeoutException>()
     .Handle <TimeoutRejectedException>()
     .Build();
 }