samples/TodoApp/TodoApp.Data/Services/RemoteTodoService.cs
/// <summary>
/// Removes an item in the list, if it exists.
/// </summary>
/// <param name="item">The item to be removed.</param>
/// <returns>A task that completes when the item is removed.</returns>
Removes an item in the list, if it exists.
Removes an item in the list if it exists .
public async Task RemoveItemAsync(TodoItem item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }
            if (item.Id == null)
            {
                return;
            }
            await InitializeAsync();
            await _table.DeleteItemAsync(item);
            TodoItemsUpdated?.Invoke(this, new TodoServiceEventArgs(TodoServiceEventArgs.ListAction.Delete, item));
        }
public async Task RemoveItemAsync ( TodoItem item ) { if ( item == null ) { throw new ArgumentNullException ( nameof ( item ) ) ; } if ( item . Id == null ) { return ; } await InitializeAsync ( ) ; await _table . DeleteItemAsync ( item ) ; TodoItemsUpdated ? . Invoke ( this , new TodoServiceEventArgs ( TodoServiceEventArgs . ListAction . Delete , item ) ) ; }
Removes an item in the list, if it exists.
Removes an item in the list if it exists .
// Short circuit for when the item has not been saved yet.
A task that completes when the item is removed.
A task that completes when the item is removed .
item
TodoItem
The item to be removed.
The item to be removed .