Пример #1
0
        /// <summary>
        /// Returns a string describing this schedule entry,
        /// using the specified <see cref="CultureInfo"/>.
        /// </summary>
        public string ToString(CultureInfo culture)
        {
            if (Includes != null && Includes.Count > 0)
            {
                if (Excludes != null && Excludes.Count > 0)
                {
                    // Format string with includes and excludes
                    return(String.Format(culture,
                                         Properties.Resources.ScheduleToStringFormatIncludesAndExcludes,
                                         Includes.ToString(culture), Excludes.ToString(culture)));
                }

                // Format string with includes only
                return(String.Format(culture,
                                     Properties.Resources.ScheduleToStringFormatIncludesOnly,
                                     Includes.ToString(culture)));
            }

            // Format string with no schedule items
            return(String.Format(culture, Properties.Resources.ScheduleToStringFormatNone));
        }