private static void LogEventsIfNecessary() { int num = 0; int num2 = 0; int num3 = 0; lock (ThrottlingPerfCounterWrapper.staticLock) { int budgetCount = ThrottlingPerfCounterWrapper.GetBudgetCount(); num3 = ((budgetCount > 0) ? (100 * ThrottlingPerfCounterWrapper.budgetsOverBudget.Count / budgetCount) : 0); } if (num3 > ThrottlingPerfCounterWrapper.massiveNumberOfUsersOverBudgetPercent && ThrottlingPerfCounterWrapper.budgetsOverBudget.Count > ThrottlingPerfCounterWrapper.minUniqueBudgetsForMassiveOverBudgetAlert) { bool flag2 = false; lock (ThrottlingPerfCounterWrapper.staticLock) { if (ThrottlingPerfCounterWrapper.budgetsOverBudget.Count > ThrottlingPerfCounterWrapper.minUniqueBudgetsForMassiveOverBudgetAlert) { flag2 = true; num = ThrottlingPerfCounterWrapper.GetBudgetCount(); num2 = ThrottlingPerfCounterWrapper.budgetsOverBudget.Count; } } if (flag2) { if (ThrottlingPerfCounterWrapper.OnLogMassiveNumberOfUsersOverBudgetDelegate != null) { ThrottlingPerfCounterWrapper.OnLogMassiveNumberOfUsersOverBudgetDelegate(num, num3); } Globals.LogEvent(DirectoryEventLogConstants.Tuple_ExcessiveMassUserThrottling, ThrottlingPerfCounterWrapper.budgetType.ToString(), new object[] { num2, ThrottlingPerfCounterWrapper.budgetType, num, num3 }); } } }