Beispiel #1
0
 public IThrottlingManager GetManager(AppliesToTypes appliesTo)
 {
     if (_maxRequestsPerSecound != null)
     {
         return(new RequestsPerSecoundManager(_maxRequestsPerSecound, appliesTo));
     }
     return((IThrottlingManager)Activator.CreateInstance(_throttlingManager));
 }
 public RequestsPerSecoundManager(long?maxRequestsPerSecound, AppliesToTypes appliesTo, long waitTime = 1000)
 {
     _maxRequestsPerSecound = maxRequestsPerSecound;
     _appliesTo             = appliesTo;
     _waitTime = waitTime;
 }