示例#1
0
        /// <summary>
        /// Adds a single exception for this recurring component
        /// </summary>
        /// <param name="recur">The date/time when this component will NOT recur.</param>
        virtual public void AddSingleException(iCalDateTime dt)
        {
            RecurrenceDates exdate = new RecurrenceDates();

            exdate.Name = "EXDATE";
            exdate.Add(dt);

            exdate.Parent = this;

            if (ExDate != null)
            {
                RecurrenceDates[] dates = new RecurrenceDates[ExDate.Length + 1];
                ExDate.CopyTo(dates, 0);
                dates[dates.Length - 1] = exdate;
                ExDate = dates;
            }
            else
            {
                ExDate = new RecurrenceDates[] { exdate }
            };
        }
        /// <summary>
        /// Adds a single exception for this recurring component
        /// </summary>
        /// <param name="recur">The date/time when this component will NOT recur.</param>
        public void AddSingleException(Date_Time dt)
        {
            RDate exdate = new RDate();

            exdate.Name = "EXDATE";
            exdate.Add(dt);

            exdate.Parent = this;

            if (ExDate != null)
            {
                RDate[] dates = new RDate[ExDate.Length + 1];
                ExDate.CopyTo(dates, 0);
                dates[dates.Length - 1] = exdate;
                ExDate = dates;
            }
            else
            {
                ExDate = new RDate[] { exdate }
            };
        }