sdk/dotnet/src/Microsoft.Datasync.Client/Offline/SyncContext.cs
/// <summary>
/// Tries to cancel an operation in the operations queue.
/// </summary>
/// <param name="error">The table operation to cancel.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns></returns>
Tries to cancel an operation in the operations queue.
Tries to cancel an operation in the operations queue .
private async Task TryCancelOperationAsync(TableOperationError error, CancellationToken cancellationToken = default)
        {
            if (!await OperationsQueue.DeleteOperationByIdAsync(error.Id, error.OperationVersion, cancellationToken).ConfigureAwait(false))
            {
                throw new InvalidOperationException("The operation has been updated and cannot be cancelled.");
            }
            await OfflineStore.DeleteAsync(SystemTables.SyncErrors, new[] { error.Id }, cancellationToken).ConfigureAwait(false);
        }
private async Task TryCancelOperationAsync ( TableOperationError error , CancellationToken cancellationToken = default ) { if ( ! await OperationsQueue . DeleteOperationByIdAsync ( error . Id , error . OperationVersion , cancellationToken ) . ConfigureAwait ( false ) ) { throw new InvalidOperationException ( " " ) ; } await OfflineStore . DeleteAsync ( SystemTables . SyncErrors , new [ ] { error . Id } , cancellationToken ) . ConfigureAwait ( false ) ; }
Tries to cancel an operation in the operations queue.
Tries to cancel an operation in the operations queue .
None
error
TableOperationError
The table operation to cancel.
The table operation to cancel .
cancellationToken
CancellationToken
A  to observe.
A to observe .