AzureTodo.TodoItemManager.DeleteTodoItemAsync C# (CSharp) Метод

DeleteTodoItemAsync() публичный Метод

Deletes the todo item from Azure storage async.
public DeleteTodoItemAsync ( AzureTodo.TodoItem item ) : System.Threading.Tasks.Task
item AzureTodo.TodoItem The Item to delete.
Результат System.Threading.Tasks.Task
		public async Task DeleteTodoItemAsync (TodoItem item)
		{
			try {
				await todoTable.DeleteAsync (item);
			} catch (MobileServiceInvalidOperationException msioe) {
				Debug.WriteLine ("INVALID {0}", msioe.Message);
			} catch (Exception e) {
				Debug.WriteLine ("ERROR {0}", e.Message);
			}
		}
		#endregion

Usage Example

Пример #1
0
        /// <summary>
        /// Deletes the given record from Azure.
        /// </summary>
        /// <param name="id">Identifier.</param>
        public async Task Delete(string id)
        {
            await manager.DeleteTodoItemAsync(new TodoItem { ID = id });

            Reload();
        }