public void Dispose() { Children.Clear(); Events.Clear(); FreeBusy.Clear(); Journals.Clear(); Todos.Clear(); }
public void Dispose() { Children.Clear(); Events.Clear(); FreeBusy.Clear(); Journals.Clear(); Todos.Clear(); TimeZones.Clear(); UniqueComponents.Clear(); }
///// <summary> ///// Returns a list of flattened recurrences for all recurring components ///// in the iCalendar. ///// </summary> ///// <returns>A list of flattened recurrences for all recurring components</returns> //public IEnumerable<RecurringComponent> FlattenRecurrences() //{ // foreach (RecurringComponent rc in RecurringComponents) // foreach (RecurringComponent instance in rc.FlattenRecurrences()) // yield return instance; //} ///// <summary> ///// Returns a list of flattened recurrences of type T. ///// </summary> ///// <typeparam name="T">The type for which to return flattened recurrences</typeparam> ///// <returns>A list of flattened recurrences of type T</returns> //public IEnumerable<T> FlattenRecurrences<T>() //{ // foreach (RecurringComponent rc in FlattenRecurrences()) // { // if (rc is T) // { // object obj = rc; // yield return (T)obj; // } // } //} ///// <summary> ///// Returns a list of flattened recurrence instances for the given date range. ///// </summary> ///// <param name="startDate">The starting date of the date range</param> ///// <param name="endDate">The ending date of the date range</param> ///// <returns>A list of flattened recurrences for the date range</returns> //public IEnumerable<RecurringComponent> GetRecurrencesForRange(Date_Time startDate, Date_Time endDate) //{ // foreach (RecurringComponent rc in GetRecurrencesForRange<RecurringComponent>(startDate, endDate)) // yield return rc; //} ///// <summary> ///// Returns a list of flattened recurrence instances of type T for the given date range. ///// </summary> ///// <param name="startDate">The starting date of the date range</param> ///// <param name="endDate">The ending date of the date range</param> ///// <returns>A list of flattened recurrences of type T for the date range</returns> //public IEnumerable<T> GetRecurrencesForRange<T>(Date_Time startDate, Date_Time endDate) //{ // Evaluate<T>(startDate, endDate); // foreach (T t in FlattenRecurrences<T>()) // { // if (t is RecurringComponent) // { // RecurringComponent rc = (RecurringComponent)(object)t; // if (rc.Start >= startDate && rc.Start <= endDate) // yield return t; // } // } //} #endregion #region IDisposable Members public void Dispose() { Children.Clear(); Events.Clear(); FreeBusy.Clear(); Journals.Clear(); Todos.Clear(); // FIXME: disposing of time zones currently causes problems when merging calendars. // There are probably problems anyway when serializing, but for now... //TimeZones.Clear(); //UniqueComponents.Clear(); }