sdk/dotnet/src/Microsoft.Datasync.Client/Offline/SyncContext.cs
/// <summary>
/// Cancels the table operation, discarding the item.
/// </summary>
/// <param name="error">The <see cref="TableOperationError"/> being processed.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns>A task that completes when the operation is finished.</returns>
Cancels the table operation, discarding the item.
Cancels the table operation discarding the item .
public async Task CancelAndDiscardItemAsync(TableOperationError error, CancellationToken cancellationToken = default)
        {
            Arguments.IsNotNull(error, nameof(error));
            if (error.Item == null)
            {
                throw new ArgumentException("Operation error must contain an item", nameof(error));
            }
            string itemId = error.Item.Value<string>(SystemProperties.JsonIdProperty);
            await TryCancelOperationAsync(error, cancellationToken).ConfigureAwait(false);
            await OfflineStore.DeleteAsync(error.TableName, new[] { itemId }, cancellationToken).ConfigureAwait(false);
        }
public async Task CancelAndDiscardItemAsync ( TableOperationError error , CancellationToken cancellationToken = default ) { Arguments . IsNotNull ( error , nameof ( error ) ) ; if ( error . Item == null ) { throw new ArgumentException ( " " , nameof ( error ) ) ; } string itemId = error . Item . Value < string > ( SystemProperties . JsonIdProperty ) ; await TryCancelOperationAsync ( error , cancellationToken ) . ConfigureAwait ( false ) ; await OfflineStore . DeleteAsync ( error . TableName , new [ ] { itemId } , cancellationToken ) . ConfigureAwait ( false ) ; }
Cancels the table operation, discarding the item.
Cancels the table operation discarding the item .
A task that completes when the operation is finished.
A task that completes when the operation is finished .
error
TableOperationError
The  being processed.
The being processed .
cancellationToken
CancellationToken
A  to observe.
A to observe .