コード例 #1
0
 private void UpdateAccountsLocally(Dictionary <String, String> idToNamesLocallyUpdated)
 {
     foreach (string id in idToNamesLocallyUpdated.Keys)
     {
         string updatedName = idToNamesLocallyUpdated[id];
         var    account     =
             _smartStore.Retrieve(AccountsSoup, _smartStore.LookupSoupEntryId(AccountsSoup, Constants.Id, id))[0]
             .ToObject <JObject>();
         account[Constants.Name]             = updatedName;
         account[SyncManager.Local]          = true;
         account[SyncManager.LocallyCreated] = false;
         account[SyncManager.LocallyDeleted] = false;
         account[SyncManager.LocallyUpdated] = true;
         _smartStore.Upsert(AccountsSoup, account);
     }
 }