private void Refresh() { CognitoSyncUtils utils = new CognitoSyncUtils(); utils.Synchronize((exception) => { if (exception != null) { Console.WriteLine("ERROR: " + exception.Message); return; } todoLists = utils.GetTasks(); if (todoLists != null && todoLists.Count > 0) { InvokeOnMainThread(() => { Root = new RootElement("Todo List") { new Section() { from t in todoLists select (Element) new CheckboxElement((string.IsNullOrEmpty(t.Title) ? string.Empty : t.Title), t.Completed) } }; }); } }); }
private void Refresh() { CognitoSyncUtils utils = new CognitoSyncUtils(); todoLists = utils.GetTasks(); utils.Synchronize(() => { todoLists = utils.GetTasks(); if (todoLists != null && todoLists.Count > 0) { InvokeOnMainThread(() => { Root = new RootElement("Todo List") { new Section() { from t in todoLists select (Element) new CheckboxElement((string.IsNullOrEmpty(t.Title) ? string.Empty : t.Title), t.Completed) } }; }); } }); }