Esempio n. 1
0
 public void AddRequest(DateTime now)
 {
     if (LastCallTimeForClients.ContainsKey(AuthToken))
     {
         LastCallTimeForClients[AuthToken] = now;
     }
     else
     {
         LastCallTimeForClients.Add(AuthToken, now);
     }
 }
Esempio n. 2
0
 public void AddRequest(DateTime now, int count)
 {
     if (CountCallsForClientsInTimspan.ContainsKey(AuthToken))
     {
         CountCallsForClientsInTimspan[AuthToken] = count + 1;
         LastCallTimeForClients[AuthToken]        = now;
     }
     else
     {
         CountCallsForClientsInTimspan.Add(AuthToken, 1);
         FirstCallTimeForClientsInTimeSpan.Add(AuthToken, now);
         LastCallTimeForClients.Add(AuthToken, now);
     }
 }