sdk/dotnet/test/Datasync.Common.Test/Mocks/MockOfflineStore.cs
/// <summary>
/// Deletes items from the table where the items are identified by a query.
/// </summary>
/// <param name="query">A query description that identifies the items to be deleted.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns>A task that completes when the items have been deleted from the table.</returns>
Deletes items from the table where the items are identified by a query.
Deletes items from the table where the items are identified by a query .
public Task DeleteAsync(QueryDescription query, CancellationToken cancellationToken = default)
        {
            if (ExceptionToThrow != null)
            {
                throw ExceptionToThrow;
            }
            DeleteQueries.Add(query);
            var table = GetOrCreateTable(query.TableName);
            var items = FilterItemList(query, table.Values).Select(o => o.Value<string>("id"));
            foreach (var item in items)
            {
                table.Remove(item);
            }
            return Task.CompletedTask;
        }
public Task DeleteAsync ( QueryDescription query , CancellationToken cancellationToken = default ) { if ( ExceptionToThrow != null ) { throw ExceptionToThrow ; } DeleteQueries . Add ( query ) ; var table = GetOrCreateTable ( query . TableName ) ; var items = FilterItemList ( query , table . Values ) . Select ( o => o . Value < string > ( " " ) ) ; foreach ( var item in items ) { table . Remove ( item ) ; } return Task . CompletedTask ; }
Deletes items from the table where the items are identified by a query.
Deletes items from the table where the items are identified by a query .
A task that completes when the items have been deleted from the table.
A task that completes when the items have been deleted from the table .
query
QueryDescription
A query description that identifies the items to be deleted.
A query description that identifies the items to be deleted .
cancellationToken
CancellationToken
A  to observe.
A to observe .