AzureTodo.TodoItemManager.GetTodoItemsAsync C# (CSharp) Method

GetTodoItemsAsync() public method

Gets all todo items async.
public GetTodoItemsAsync ( ) : Task>
return Task>
		public async Task<List<TodoItem>> GetTodoItemsAsync ()
		{
			try {
				return new List<TodoItem> (await todoTable.ReadAsync());
			} catch (MobileServiceInvalidOperationException msioe) {
				Debug.WriteLine ("INVALID {0}", msioe.Message);
			} catch (Exception e) {
				Debug.WriteLine ("ERROR {0}", e.Message);
			}

			return null;
		}

Usage Example

Exemplo n.º 1
0
        /// <summary>
        /// Reloads all of the records from Azure and displays them in the table.
        /// </summary>
        public async Task Reload()
        {
            var items = await manager.GetTodoItemsAsync();

            Console.WriteLine("items retrieved: " + items.Count);
            todoTable.DataSource = new TableDataSource(items);
            todoTable.Delegate   = new TableDelegate(this);
        }
All Usage Examples Of AzureTodo.TodoItemManager::GetTodoItemsAsync