Пример #1
0
 public SendProviderRestrictionDataLog RegisterJob(DateTimePeriod period, int MessagesWasSended)
 {
     Jobs.Add(new JobPeriod {
         period = period, MessagesCount = MessagesWasSended
     });
     return(this);
 }
Пример #2
0
 public int GetMessagesSendedForPeriodCount(DateTimePeriod period)
 {
     return(Jobs
            .Where(x => x.period.Start <= period.End && x.period.End >= period.Start)
            .Sum(x => x.MessagesCount));
 }