// FIXME: add similar methods for RDATE and EXDATE /// <summary> /// Adds a recurrence rule to the recurring component /// </summary> /// <param name="recur">The recurrence rule to add</param> public void AddRecurrence(Recur recur) { if (RRule != null) { Recur[] rules = new Recur[RRule.Length + 1]; RRule.CopyTo(rules, 0); rules[rules.Length - 1] = recur; RRule = rules; } else { RRule = new Recur[] { recur } }; }
// FIXME: add similar methods for RDATE and EXDATE /// <summary> /// Adds a recurrence rule to the recurring component /// </summary> /// <param name="recur">The recurrence rule to add</param> public void AddRecurrence(Recur recur) { if (string.IsNullOrEmpty(recur.Name)) { recur.Name = "RRULE"; } if (RRule != null) { Recur[] rules = new Recur[RRule.Length + 1]; RRule.CopyTo(rules, 0); rules[rules.Length - 1] = recur; RRule = rules; } else { RRule = new Recur[] { recur } }; }
/// <summary> /// Adds a recurrence rule to the recurring component /// </summary> /// <param name="recur">The recurrence rule to add</param> virtual public void AddRecurrencePattern(RecurrencePattern recur) { if (string.IsNullOrEmpty(recur.Name)) { recur.Name = "RRULE"; } recur.Parent = this; if (RRule != null) { RecurrencePattern[] rules = new RecurrencePattern[RRule.Length + 1]; RRule.CopyTo(rules, 0); rules[rules.Length - 1] = recur; RRule = rules; } else { RRule = new RecurrencePattern[] { recur } }; }