/// <summary>
        /// Initializes a new instance of the <see cref="AggregateResult"/> class.
        /// </summary>
        /// <param name="value">The value of the result.</param>
        /// <param name="count">The number of arguments used for the calculation of the result.</param>
        /// <param name="function">Function that generated the result.</param>
        /// <exception cref="ArgumentNullException"><c>function</c> is null.</exception>
        public AggregateResult(object value, int count, AggregateFunction function)
        {
            if (function == null)
            {
                throw new ArgumentNullException("function");
            }

            aggregateValue = value;
            itemCount = count;
            this.function = function;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="AggregateResult"/> class.
 /// </summary>
 /// <param name="value">The value of the result.</param>
 /// <param name="function"><see cref="AggregateFunction"/> that generated the result.</param>
 public AggregateResult(object value, AggregateFunction function)
     : this(value, default(int), function)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AggregateResult"/> class.
 /// </summary>
 /// <param name="function"><see cref="AggregateFunction"/> that generated the result.</param>
 /// <exception cref="ArgumentNullException"><c>function</c> is null.</exception>
 public AggregateResult(AggregateFunction function)
     : this(null, function)
 {
 }