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)); }
public RestApiService(string baseUrl, string dateFormat) { _restClient = new RestClient(baseUrl); _dateFormat = dateFormat; _rateGate = new NullRateGate(); }
public YammerServiceManager(IYammerService service, IRateGate rateGate) { _service = service; _rateGate = rateGate; }