sdk/dotnet/src/Microsoft.Datasync.Client/Offline/SyncContext.cs
/// <summary>
/// Cancels an operation and updated the item with the version from the service.
/// </summary>
/// <param name="error">The <see cref="TableOperationError"/> that is being processed.</param>
/// <param name="item">The item to use for updating.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns>A task that completes when the update is finished.</returns>
Cancels an operation and updated the item with the version from the service.
Cancels an operation and updated the item with the version from the service .
public async Task CancelAndUpdateItemAsync(TableOperationError error, JObject item, CancellationToken cancellationToken = default)
        {
            Arguments.IsNotNull(error, nameof(error));
            Arguments.IsNotNull(item, nameof(item));
            if (error.Item == null)
            {
                throw new ArgumentException("Operation error must contain an item", nameof(error));
            }
            await TryCancelOperationAsync(error, cancellationToken).ConfigureAwait(false);
            await OfflineStore.UpsertAsync(error.TableName, new[] { item }, true, cancellationToken).ConfigureAwait(false);
        }
public async Task CancelAndUpdateItemAsync ( TableOperationError error , JObject item , CancellationToken cancellationToken = default ) { Arguments . IsNotNull ( error , nameof ( error ) ) ; Arguments . IsNotNull ( item , nameof ( item ) ) ; if ( error . Item == null ) { throw new ArgumentException ( " " , nameof ( error ) ) ; } await TryCancelOperationAsync ( error , cancellationToken ) . ConfigureAwait ( false ) ; await OfflineStore . UpsertAsync ( error . TableName , new [ ] { item } , true , cancellationToken ) . ConfigureAwait ( false ) ; }
Cancels an operation and updated the item with the version from the service.
Cancels an operation and updated the item with the version from the service .
A task that completes when the update is finished.
A task that completes when the update is finished .
error
TableOperationError
The  that is being processed.
The that is being processed .
item
JObject
The item to use for updating.
The item to use for updating .
cancellationToken
CancellationToken
A  to observe.
A to observe .