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(); }
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 }; }
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 }); }