public void SaveCounterCategory(CounterCategoryInfo cat)
 {
     MongoCollection<BsonDocument> items = Database.GetCollection("countersInfo");
     items.Insert(new BsonDocument
                      {
                          {"category", cat.Name},
                          {"id", cat.Id},
                          {"counters", new BsonArray()}
                      }, SafeMode.True);
 }
Пример #2
0
 private static DateTime GetLastProcessedDateForCounter(CounterCategoryInfo counterCategoryInfo, CounterNameInfo counterNameInfo)
 {
     if (_lastDates.ContainsKey(counterCategoryInfo.Name + "." + counterNameInfo.Name))
         return _lastDates[counterCategoryInfo.Name + "." + counterNameInfo.Name];
     else
         return DateTime.MinValue;
 }