コード例 #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>
        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 }
            };
        }
コード例 #2
0
        /// <summary>
        /// Adds a single recurrence for this recurring component.
        /// </summary>
        /// <param name="dt">The date/time when this component will recur.</param>
        public void AddSingleRecurrence(Date_Time dt)
        {
            RDate rdate = new RDate();

            rdate.Name = "RDATE";
            rdate.Add(dt);

            rdate.Parent = this;

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