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

            if (OrdDay != null)
            {
                str.Append(OrdDay);
            }
            str.Append(RecurValues.ToString(DayOfWeek));
            return(str.ToString());
        }
Esempio n. 2
0
        public override string ToString()
        {
            var strBuilder = new StringBuilder();

            if (Frequency == null)
            {
                return("Frequency is Required for this valueType");
            }

            strBuilder.Append("FREQ=");
            strBuilder.Append(RecurValues.ToString(Frequency.Value));

            if (Until != null)
            {
                strBuilder.Append(";UNTIL=");
                strBuilder.Append(Until.Value.ToString("yyyyMMddTHHmmss") +
                                  (Until.Value.Kind == DateTimeKind.Utc ? "Z" : ""));
            }
            if (Count != null)
            {
                strBuilder.Append(";COUNT=");
                strBuilder.Append(Count);
            }
            if (Interval != null)
            {
                strBuilder.Append(";INTERVAL=");
                strBuilder.Append(Interval);
            }
            if (BySeconds != null && BySeconds.Length > 0)
            {
                strBuilder.Append(";BYSECOND=");
                AppendAllMembers(strBuilder, BySeconds);
            }
            if (ByMinutes != null && ByMinutes.Length > 0)
            {
                strBuilder.Append(";BYMINUTE=");
                AppendAllMembers(strBuilder, ByMinutes);
            }
            if (ByHours != null && ByHours.Length > 0)
            {
                strBuilder.Append(";BYHOUR=");
                AppendAllMembers(strBuilder, ByHours);
            }
            if (ByDays != null && ByDays.Length > 0)
            {
                strBuilder.Append(";BYDAY=");
                AppendAllMembers(strBuilder, ByDays);
            }
            if (ByMonthDay != null && ByMonthDay.Length > 0)
            {
                strBuilder.Append(";BYMONTHDAY=");
                AppendAllMembers(strBuilder, ByMonthDay);
            }
            if (ByYearDay != null && ByYearDay.Length > 0)
            {
                strBuilder.Append(";BYYEARDAY=");
                AppendAllMembers(strBuilder, ByYearDay);
            }
            if (ByWeekNo != null && ByWeekNo.Length > 0)
            {
                strBuilder.Append(";BYWEEKNO=");
                AppendAllMembers(strBuilder, ByWeekNo);
            }
            if (ByMonth != null && ByMonth.Length > 0)
            {
                strBuilder.Append(";BYMONTH=");
                AppendAllMembers(strBuilder, ByMonth);
            }
            if (BySetPos != null && BySetPos.Length > 0)
            {
                strBuilder.Append(";BYSETPOS=");
                AppendAllMembers(strBuilder, BySetPos);
            }
            if (_weekStart != null)
            {
                strBuilder.Append(";WKST=");
                strBuilder.Append(RecurValues.ToString(Wkst));
            }

            return(strBuilder.ToString());
        }