/// <summary> /// Adds a rate limiter to the client. There are 2 choices, the <see cref="RateLimiterTotal"/> and the <see cref="RateLimiterPerEndpoint"/>. /// </summary> /// <param name="limiter">The limiter to add</param> public void AddRateLimiter(IRateLimiter limiter) { var rateLimiters = RateLimiters.ToList(); rateLimiters.Add(limiter); RateLimiters = rateLimiters; }
/// <summary> /// Adds a rate limiter to the client. There are 2 choices, the <see cref="RateLimiterTotal"/> and the <see cref="RateLimiterPerEndpoint"/>. /// </summary> /// <param name="limiter">The limiter to add</param> public void AddRateLimiter(IRateLimiter limiter) { if (limiter == null) { throw new ArgumentNullException(nameof(limiter)); } var rateLimiters = RateLimiters.ToList(); rateLimiters.Add(limiter); RateLimiters = rateLimiters; }