StreetFoo.Client.SynchronizeReportsTask.DoRun C# (CSharp) Method

DoRun() protected method

protected DoRun ( IBackgroundTaskInstance instance ) : System.Threading.Tasks.Task
instance IBackgroundTaskInstance
return System.Threading.Tasks.Task
        protected override async Task DoRun(IBackgroundTaskInstance instance)
        {
            if(!(await this.RestoreLogonAsync()))
                return;

            // send...
            await ReportItem.SendLocalChangesAsync();

            // get new items...
            bool changed = await ReportItem.UpdateCacheFromServerAsync();

            // if we've changed, we need to signal the UI...
            if (changed)
                await new NewReportsSignal().EnqueueAsync();
        }
    }
SynchronizeReportsTask