Пример #1
0
        public static PerformanceAggregate CloneForSwitch(PerformanceAggregate aggregate)
        {
            var result = new PerformanceAggregate(aggregate.Counter, aggregate.Values);

            {
                aggregate.Values = PerformanceItemCollection.CloneAndInitialize(aggregate.Counter.NextValue(), aggregate.Values.LastValue);
            }

            return(result);
        }
Пример #2
0
 private PerformanceAggregate(PerformanceCounter counter, PerformanceItemCollection values)
 {
     Counter = counter;
     Values  = values;
 }
Пример #3
0
 public static PerformanceAggregate Create(PerformanceCounter counter)
 {
     return(new PerformanceAggregate(counter, values: PerformanceItemCollection.CreateAndInitialize(counter.NextValue())));
 }