Пример #1
0
 public StatisticsViewModel(IStoreStatistics s)
 {
     CommitId = s.CommitId;
     CommitTimestamp = s.CommitTimestamp;
     TotalTripleCount = s.TotalTripleCount;
     PredicateTripleCounts =
         s.PredicateTripleCounts.Select(
             e => new PredicateTripleCountViewModel {Predicate = e.Key, TripleCount = e.Value}).ToList();
 }
Пример #2
0
 private static StatisticsResponseModel MakeResponseModel(IStoreStatistics stats)
 {
     return new StatisticsResponseModel
     {
         CommitId = stats.CommitId,
         CommitTimestamp = stats.CommitTimestamp,
         PredicateTripleCounts = stats.PredicateTripleCounts == null ? new Dictionary<string, ulong>() : new Dictionary<string, ulong>(stats.PredicateTripleCounts),
         TotalTripleCount = stats.TotalTripleCount
     };
 }
Пример #3
0
 private static StatisticsResponseModel MakeResponseModel(IStoreStatistics stats)
 {
     return(new StatisticsResponseModel
     {
         CommitId = stats.CommitId,
         CommitTimestamp = stats.CommitTimestamp,
         PredicateTripleCounts = stats.PredicateTripleCounts == null ? new Dictionary <string, ulong>() : new Dictionary <string, ulong>(stats.PredicateTripleCounts),
         TotalTripleCount = stats.TotalTripleCount
     });
 }
Пример #4
0