public void AddRequest(DateTime now) { if (LastCallTimeForClients.ContainsKey(AuthToken)) { LastCallTimeForClients[AuthToken] = now; } else { LastCallTimeForClients.Add(AuthToken, now); } }
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); } }