public void Dispose() { Children.Clear(); Events.Clear(); FreeBusy.Clear(); Journals.Clear(); Todos.Clear(); }
private void GetTodosCmd() { Todos.Clear(); var todos = dbService.GetTodos(); foreach (var item in todos) { Todos.Add(item); } }
public void Dispose() { Children.Clear(); Events.Clear(); FreeBusy.Clear(); Journals.Clear(); Todos.Clear(); TimeZones.Clear(); UniqueComponents.Clear(); }
public async Task GetTodos() { Todos.Clear(); //get new var todos = await _todoService.GetTodos(); foreach (var todo in todos) { Todos.Add(todo); } }
///// <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(); }
public void OnNext(AppState value) { // TODO: Update only the difference. Todos.Clear(); foreach (var todo in value.TodoManager.Todos) { Todos.Add(new TodoViewModel() { Id = todo.Id, Text = todo.Text, }); } }
public void Post(ResetTodos request) { Counter = 0; Todos.Clear(); }
public void Post(ResetTodos request) => Todos.Clear();