// Token: 0x0600003C RID: 60 RVA: 0x000032E8 File Offset: 0x000014E8 public static void LogTokenExpiry(object key, DailyTokenBucket dailyTokenBucket) { if (!ThrottlingServiceLog.enabled) { return; } LogRowFormatter logRowFormatter = new LogRowFormatter(ThrottlingServiceLog.throttlingServiceLogSchema); logRowFormatter[5] = key; logRowFormatter[10] = string.Format("Expiring entry. Details: {0}", dailyTokenBucket); logRowFormatter[1] = ThrottlingServiceLog.ThrottlingEventId.EXPIRE; ThrottlingServiceLog.log.Append(logRowFormatter, 0); }
// Token: 0x06000043 RID: 67 RVA: 0x000034B8 File Offset: 0x000016B8 public bool ObtainTokens(ObtainTokensRequest <KeyT> request) { if (this.cleanupTimer == null) { throw new InvalidOperationException("TokenBucketMap instance is not started."); } DateTime utcNow = DateTime.UtcNow; bool result; lock (this.data) { DailyTokenBucket dailyTokenBucket; if (!this.data.TryGetValue(request.MailboxGuid, out dailyTokenBucket)) { dailyTokenBucket = new DailyTokenBucket(); this.data.Add(request.MailboxGuid, dailyTokenBucket); } result = dailyTokenBucket.ObtainTokens <KeyT>(request, utcNow); } return(result); }