Example #1
0
        public async Task UpdateLocalFromRemote()
        {
            try
            {
                await LoadStorage();

                NotifySynchronizationStarted();

                SynchronizationResult result = null;

                if (synchronizer != null)
                {
                    result = await synchronizer.UpdateLocalFromRemote(plainStorage);

                    if (result.Accounts != null)
                    {
                        accounts = result.Accounts.ToList();

                        await Persist(false);
                    }
                }

                NotifySynchronizationCompleted(result);
            }
            catch (Exception e)
            {
                CompleteWithException(e);

                throw e;
            }
        }