コード例 #1
0
        public static IOrderedEnumerable <KeyValuePair <TKey, Int64> > Order <TKey>([NotNull] this ILongCounter <TKey> counter)
        {
            if (counter is null)
            {
                throw new ArgumentNullException(nameof(counter));
            }

            return(counter.OrderByValues());
        }
コード例 #2
0
 private ILongCounter[] CreateCounters()
 {
     var values = Enum.GetValues(typeof(CounterMetric));
     var counters = new ILongCounter[values.Length];
     foreach (var value in values)
     {
         counters[(int)value] = new InterlockingLongCounter();
     }
     return counters;
 }
コード例 #3
0
        private ILongCounter[] CreateCounters()
        {
            var values   = Enum.GetValues(typeof(CounterMetric));
            var counters = new ILongCounter[values.Length];

            foreach (var value in values)
            {
                counters[(int)value] = new InterlockingLongCounter();
            }
            return(counters);
        }