/// <summary>
        /// Outputs debug information about observations and calls any registered event
        /// handlers.
        /// </summary>
        /// <param name="continuousObservations">
        /// Each item will be passed to <see cref="Debug.WriteLine(object)"/>.
        /// </param>
        /// <returns>An empty set of aggregated data points.</returns>
        public IEnumerable<AggregatedDataPoint> Aggregate(
            ConsecutiveDataPointObservationsCollection continuousObservations)
        {
            Debug.WriteLine("Enter: SampleDataPointAggregator.Aggregate");

            if (continuousObservations == null)
            {
                throw new ArgumentNullException("continuousObservations");
            }

            Debug.WriteLine(string.Join(" ", continuousObservations.ToArray()));

            IEnumerable<AggregatedDataPoint> result = this.callback(continuousObservations);

            Debug.WriteLine("Success: SampleDataPointAggregator.Aggregate");

            return result;
        }
        /// <inheritdoc />
        public IEnumerable<AggregatedDataPoint> Aggregate(ConsecutiveDataPointObservationsCollection continuousObservations)
        {
            IEnumerable<DataPointObservation> remainingPoints = continuousObservations;
            while (remainingPoints.Any())
            {
                DateTime aggregateUtcTime = TruncateToSecondsUtc(remainingPoints.First().UtcTimestamp);

                Func<DataPointObservation, bool> inAggregationWindow =
                    p => TruncateToSecondsUtc(p.UtcTimestamp).Ticks == aggregateUtcTime.Ticks;

                IEnumerable<DataPointObservation> pointsUnderConsideration = remainingPoints.TakeWhile(inAggregationWindow);
                remainingPoints = remainingPoints.SkipWhile(inAggregationWindow);

                yield return new AggregatedDataPoint()
                {
                    UtcTimestamp = aggregateUtcTime,
                    AggregatedValue = pointsUnderConsideration.Average(p => p.Value),
                };
            }

            yield break;
        }