private static void StartPush() { // Push books to the server PushMyBooksWork(); // Push my stuffs to the srever List <Book> bookList = BooksOnDeviceAccessor.GetAllBooks(); if (bookList != null && bookList.Count > 0) { foreach (var book in bookList) { PushMyStuffsWork(book); } } }
private static void PushMyBooksWork() { try { List <Book> bookList = BooksOnDeviceAccessor.GetAllBooks(); if (bookList != null && bookList.Count > 0) { SaveMyStuff.SetMyBooks(bookList); // Remove books that are marked as removed List <Book> removeList = BooksOnDeviceAccessor.GetRemovedBooks(); if (removeList != null && removeList.Count > 0) { BookRemover.RemoveBooks(removeList); } } } catch (Exception ex) { Logger.WriteLineDebugging("CloudSync - PushMyBooksWork: {0}", ex.ToString()); } }
private static void PushStart() { if (Reachability.IsDefaultNetworkAvailable()) { // SEND List <Book> bookList = BooksOnDeviceAccessor.GetAllBooks(); if (bookList != null && bookList.Count > 0) { SendMyBooks(bookList); SendMyBookmarks(bookList); SendMyNotes(bookList); SendMyAnnotations(bookList); } else { sentBooks = sentBookmarks = sentNotes = sentAnnotations = true; CheckSentDone(); } } }