/// <summary>
        /// Check that both breaks have same types and same Duration and TimeInterval values.
        /// </summary>
        /// <param name="breakObject">Brake to compare with this.</param>
        /// <returns>'True' if breaks types and  Duration and TimeInterval
        /// values are the same, 'false' otherwise.</returns>
        internal override bool EqualsByValue(Break breakObject)
        {
            TimeIntervalBreak breakToCompare = breakObject as TimeIntervalBreak;

            return(breakToCompare != null && base.EqualsByValue(breakObject) &&
                   breakToCompare.TimeInterval == this.TimeInterval);
        }
        /// <summary>
        /// Converts the string representation of a break to break's values.
        /// </summary>
        /// <param name="context">String representation of a break.</param>
        /// <param name="intervalBreak">Parsed break's.</param>
        protected static void _Parse(string context, TimeIntervalBreak intervalBreak)
        {
            Debug.Assert(!string.IsNullOrEmpty(context));

            char[] valuesSeparator = new char[1] {
                CommonHelpers.SEPARATOR
            };
            string[] values = context.Split(valuesSeparator, StringSplitOptions.None);
            Debug.Assert(3 == values.Length);

            CultureInfo cultureInfo = CultureInfo.GetCultureInfo(CommonHelpers.STORAGE_CULTURE);
            int         index       = 0;

            // 0. Current version, now not used
            // 1. Duration
            intervalBreak.Duration = double.Parse(values[++index], cultureInfo);
            // 2. Interval
            intervalBreak.TimeInterval = double.Parse(values[++index], cultureInfo);
        }
 /// <summary>
 /// Copies all the breaks's data to the target interval break.
 /// </summary>
 /// <param name="intervalBreak">Target interval break.</param>
 protected void _CopyTo(TimeIntervalBreak intervalBreak)
 {
     intervalBreak.Duration = this.Duration;
     intervalBreak.TimeInterval = this.TimeInterval;
 }
        /// <summary>
        /// Converts the string representation of a break to break's values.
        /// </summary>
        /// <param name="context">String representation of a break.</param>
        /// <param name="intervalBreak">Parsed break's.</param>
        protected static void _Parse(string context, TimeIntervalBreak intervalBreak)
        {
            Debug.Assert(!string.IsNullOrEmpty(context));

            char[] valuesSeparator = new char[1] { CommonHelpers.SEPARATOR };
            string[] values = context.Split(valuesSeparator, StringSplitOptions.None);
            Debug.Assert(3 == values.Length);

            CultureInfo cultureInfo = CultureInfo.GetCultureInfo(CommonHelpers.STORAGE_CULTURE);
            int index = 0;
            // 0. Current version, now not used
            // 1. Duration
            intervalBreak.Duration = double.Parse(values[++index], cultureInfo);
            // 2. Interval
            intervalBreak.TimeInterval = double.Parse(values[++index], cultureInfo);
        }
 /// <summary>
 /// Copies all the breaks's data to the target interval break.
 /// </summary>
 /// <param name="intervalBreak">Target interval break.</param>
 protected void _CopyTo(TimeIntervalBreak intervalBreak)
 {
     intervalBreak.Duration     = this.Duration;
     intervalBreak.TimeInterval = this.TimeInterval;
 }