示例#1
0
        private List <Statistic> InsertNewStatistics(Dictionary <KeyValuePair <DateTime, int>, int> pageViews)
        {
            var addedStatistics = new List <Statistic>(pageViews.Count);

            foreach (var pageView in pageViews)
            {
                var s = new Statistic {
                    TimeSlot = pageView.Key.Key, PageID = pageView.Key.Value, Views = pageView.Value
                };
                addedStatistics.Add(s);
            }
            statistics.SaveOrUpdate(addedStatistics);
            statistics.Flush();
            return(addedStatistics);
        }
示例#2
0
 private void ClearBuckets(Bucket[] collectedBuckets)
 {
     buckets.Delete(collectedBuckets);
     buckets.Flush();
 }