/// <summary> /// Cleans up database by removing all items from the in-memory storage /// </summary> /// <param name="context"></param> /// <returns></returns> public override bool CleanupDatabase(CallContext context) { ItemsById.Clear(); ItemsByParentId.Clear(); return(true); }
/// <summary> /// Clear all data and reload from the handlers. /// </summary> private void LoadItems() { ItemsById.Clear(); ItemsByParentId.Clear(); foreach (IDataHandler dataHandler in DataHandlers) { foreach (SyncItem item in dataHandler.LoadItems()) { AddItem(item); } } }