public void TryRecycle()
        {
            var measurementAggregator = new MeasurementAggregator(
                new MetricSeriesConfigurationForMeasurement(restrictToUInt32Values: false),
                dataSeries: null,
                aggregationCycleKind: CycleKind.Custom);

            var accumulatorAggregator = new MetricSeriesConfigurationForTestingAccumulatorBehavior.Aggregator(
                new MetricSeriesConfigurationForTestingAccumulatorBehavior(),
                dataSeries: null,
                aggregationCycleKind: CycleKind.Custom);


            CommonSimpleDataSeriesAggregatorTests.TryRecycle_NonpersistentAggregator(measurementAggregator);
            CommonSimpleDataSeriesAggregatorTests.TryRecycle_PersistentAggregator(accumulatorAggregator);
        }
        public void Reset()
        {
            {
                var aggregator = new MeasurementAggregator(
                    new MetricSeriesConfigurationForMeasurement(restrictToUInt32Values: false),
                    dataSeries: null,
                    aggregationCycleKind: CycleKind.Custom);

                CommonSimpleDataSeriesAggregatorTests.Reset_NonpersistentAggregator(aggregator, aggregateKindMoniker: "Microsoft.Azure.Measurement");
            }
            {
                var aggregator = new MetricSeriesConfigurationForTestingAccumulatorBehavior.Aggregator(
                    new MetricSeriesConfigurationForTestingAccumulatorBehavior(),
                    dataSeries: null,
                    aggregationCycleKind: CycleKind.Custom);

                CommonSimpleDataSeriesAggregatorTests.Reset_PersistentAggregator(aggregator, aggregateKindMoniker: "Microsoft.Azure.AccumulatorForTesting");
            }
        }
        public void CompleteAggregation()
        {
            var aggregationManager = new MetricAggregationManager();

            var mesurementConfig  = new MetricSeriesConfigurationForMeasurement(restrictToUInt32Values: false);
            var measurementMetric = new MetricSeries(aggregationManager, new MetricIdentifier("Animal Metrics", "Cows Sold"), null, mesurementConfig);

            var measurementAggregator = new MeasurementAggregator(
                (MetricSeriesConfigurationForMeasurement)measurementMetric.GetConfiguration(),
                measurementMetric,
                CycleKind.Custom);

            var accumulatorConfig = new MetricSeriesConfigurationForTestingAccumulatorBehavior();
            var accumulatorMetric = new MetricSeries(aggregationManager, new MetricIdentifier("Animal Metrics", "Cows Sold"), null, accumulatorConfig);

            var accumulatorAggregator = new MetricSeriesConfigurationForTestingAccumulatorBehavior.Aggregator(
                (MetricSeriesConfigurationForTestingAccumulatorBehavior)accumulatorMetric.GetConfiguration(),
                accumulatorMetric,
                CycleKind.Custom);

            CommonSimpleDataSeriesAggregatorTests.CompleteAggregation_NonpersistentAggregator(measurementAggregator);
            CommonSimpleDataSeriesAggregatorTests.CompleteAggregation_PersistentAggregator(accumulatorAggregator);
        }