Example #1
0
 /// <summary>
 /// create a new instance
 /// </summary>
 /// <param name="storage"></param>
 /// <param name="algorithm"></param>
 /// <param name="error"></param>
 private RateLimitProcessor(IRateLimitStorage storage, IRateLimitAlgorithm <TRequest> algorithm, RateLimitError error)
 {
     _algorithm = algorithm;
     _storage   = storage;
     _error     = error;
 }
Example #2
0
 /// <summary>
 /// Sets a instance of IRateLimitAlgorithm
 /// </summary>
 /// <param name="algorithm"></param>
 /// <returns></returns>
 public Builder WithAlgorithm(IRateLimitAlgorithm <TRequest> algorithm)
 {
     _algorithm = algorithm;
     return(this);
 }