private async Task Init() { try { // Initialize Azure azureClient = new SampleMobileClient(mobileAppUri, supportLocalDatabase); await azureClient.InitializeLocalStore(); // Retrieve the items from the server todoTableDAO = new AppServiceTableDAO <TodoItem>(azureClient); todoItems = await todoTableDAO.FindAll(); // Populate the UI for (int i = 0; i < todoItems.Count; i++) { TodoItem item = todoItems[i]; float x = (i % listColumns) * 1.2f; float y = (i / listColumns) * 1.2f; float z = listDistance; HoloLensClickableElement obj = Instantiate(tile, new Vector3(x, y, z), Quaternion.identity); obj.Setup(item); obj.OnClick += Item_Click; } log.gameObject.SetActive(false); } catch (Exception ex) { log.text = ex.ToString(); } }
private async Task Get() { List <TodoItem> list = await todoTableDAO.FindAll(); StringBuilder contents = new StringBuilder(); foreach (TodoItem item in list) { contents.AppendLine("ID: " + item.Id); contents.AppendLine("Text: " + item.Text); contents.AppendLine("Completed: " + item.Complete); contents.AppendLine(); } output.text = contents.ToString(); }