コード例 #1
0
        private async Task <GetStatsResult> StatsAsync(Context context)
        {
            var counters = new CounterSet();

            var statsResult = await ContentStore.GetStatsAsync(context).ConfigureAwait(false);

            if (!statsResult.Succeeded)
            {
                return(statsResult);
            }

            counters.Merge(statsResult.CounterSet);

            statsResult = await MemoizationStore.GetStatsAsync(context).ConfigureAwait(false);

            if (!statsResult.Succeeded)
            {
                return(statsResult);
            }

            counters.Merge(statsResult.CounterSet);

            return(new GetStatsResult(counters));
        }