Esempio n. 1
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.Append(ItineraryConvert.ToString(_Event.StartTime));

            // Output TDL in same notation used to create this.
            switch (_Notation)
            {
            case NotationKind.Lasting:
                TimeSpan Duration = _Event.Duration;
                if (Duration != TimeSpan.Zero)
                {
                    sb.Append(" lasting ");
                    sb.Append(ItineraryConvert.ToString(Duration));
                }
                break;

            case NotationKind.To:
                sb.Append(" to ");
                sb.Append(ItineraryConvert.ToString(_Event.EndTime));
                break;
            }

            return(sb.ToString());
        }
Esempio n. 2
0
        public override string ToString()
        {
            string SchedString = _Schedule.OperatorPrecedence > this.OperatorPrecedence ? "(" + _Schedule.ToString() + ")" : _Schedule.ToString();

            return(_OffsetTime.Ticks >= 0 ?
                   string.Format("{0} + {1}", SchedString, ItineraryConvert.ToString(_OffsetTime)) :
                   string.Format("{0} - {1}", SchedString, ItineraryConvert.ToString(_OffsetTime.Negate())));
        }
Esempio n. 3
0
        public override string ToString()
        {
            var sb = new StringBuilder(string.Format("cron {0} {1} {2} {3} {4}", _MinuteLookup.CronSpec, _HourLookup.CronSpec, _DayLookup.CronSpec, _MonthLookup.CronSpec, _DayOfWeekLookup.CronSpec));

            if (_Duration != TimeSpan.Zero)
            {
                sb.Append(" lasting ");
                sb.Append(ItineraryConvert.ToString(_Duration));
            }
            return(sb.ToString());
        }
Esempio n. 4
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.Append("every ");
            sb.Append(ItineraryConvert.ToString(_Interval));
            if (_SyncTime != DateTime.MinValue)
            {
                sb.Append(" since ");
                sb.Append(ItineraryConvert.ToString(_SyncTime));
            }
            if (_Duration != TimeSpan.Zero)
            {
                sb.Append(" lasting ");
                sb.Append(ItineraryConvert.ToString(_Duration));
            }
            return(sb.ToString());
        }
Esempio n. 5
0
 /// <summary>
 /// Convert to TDL string.
 /// </summary>
 /// <returns>String value.</returns>
 public override string ToString()
 {
     return(string.Format("{0} T{1}", ItineraryConvert.ToString(_StartTime), Duration.ToString()));
 }
Esempio n. 6
0
        public override string ToString()
        {
            string SchedString = _Schedule.OperatorPrecedence > this.OperatorPrecedence ? "(" + _Schedule.ToString() + ")" : _Schedule.ToString();

            return(SchedString + " lasting " + ItineraryConvert.ToString(_Duration));
        }