protected LimitLoger(string configurationName, SLimits.LimitData limit) { this.ConfigurationName = configurationName; this.Limit = limit; this.UsedAmount = limit.Max - limit.Remaining; this.UsedPercents = (int)Math.Round((double)this.UsedAmount * 100 / limit.Max); }
protected virtual void ProcessLimit(SLimits.LimitData limit, ILimitLoger limitLoger, int threshold) { if (threshold >= 0 && threshold <= 100) { if (limitLoger.UsedPercents >= threshold) { limitLoger.LogPointWarning(); } } if (limit.Remaining == 0) { limitLoger.LogHasReachedError(); } }
public ApiDailyRequestsLoger(string configurationName, SLimits.LimitData limit) : base(configurationName, limit) { }
public DataStorageLoger(string configurationName, SLimits.LimitData limit) : base(configurationName, limit) { }