public static void SavePages(String bookID, List <Page> list) { if (!String.IsNullOrEmpty(URL.ServerURL)) { PersistantObjectsStorage.Add(mainKey + URL.ServerURL + bookKey + bookID + chapterKey + pageKey, list); } }
public static void SaveBooks(List <Book> list) { if (!String.IsNullOrEmpty(URL.ServerURL)) { if (list != null) { List <Book> bookList = GetBooks(); if (bookList != null) { foreach (Book b1 in list) { foreach (Book b2 in bookList) { if (b1.ID == b2.ID) { b1.Viewed = b2.Viewed; break; } } } } PersistantObjectsStorage.Add(mainKey + URL.ServerURL + bookKey, list); } } }
private void SaveTable(String tableId) { // NOTE: This method abstracts away just how and where we store the table. Dictionary <String, T> cachedTable = GetCachedTable(tableId); if (cachedTable != null) { String key = BuildTableKey(tableId); PersistantObjectsStorage.Add(key, cachedTable); } }