/// <summary>
        /// Initializes a new instance of the <see cref="TimeInterval"/> class.
        /// </summary>
        /// <param name="valueMode">Value mode.</param>
        /// <param name="begin">Beginning of the interval.</param>
        /// <param name="end">End of the interval.</param>
        public TimeInterval(IntervalValueMode valueMode, int begin, int end)
        {
            if (begin < 0)
            {
                throw new ArgumentOutOfRangeException("begin", "can't be negative");
            }
            else if (end <= 0)
            {
                throw new ArgumentOutOfRangeException("end", "can't be zero or negative");
            }

            _valueMode = valueMode;
            _begin = begin;
            _end = end;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="TimeInterval"/> class.
 /// </summary>
 /// <param name="valueMode">Value mode.</param>
 public TimeInterval(IntervalValueMode valueMode)
 {
     _valueMode = valueMode;
     _begin = 0;
     _end = 0;
 }