예제 #1
0
 public void SetRateLimiter(int maximumNumberOfCallsBySecond)
 {
     if (maximumNumberOfCallsBySecond < 1)
     {
         throw new ArgumentOutOfRangeException("maximumNumberOfCallsBySecond", maximumNumberOfCallsBySecond, "Must be a strictly positive number");
     }
     _rateGate = new RateGate(maximumNumberOfCallsBySecond, TimeSpan.FromSeconds(1));
 }
예제 #2
0
 public RestApiService(string baseUrl, string dateFormat)
 {
     _restClient = new RestClient(baseUrl);
     _dateFormat = dateFormat;
     _rateGate   = new NullRateGate();
 }
예제 #3
0
 public YammerServiceManager(IYammerService service, IRateGate rateGate)
 {
     _service = service;
     _rateGate = rateGate;
 }