sdk/dotnet/src/Microsoft.Datasync.Client/Offline/SyncContext.cs
/// <summary>
/// Updates the item within an operation for retry.
/// </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>
Updates the item within an operation for retry.
Updates the item within an operation for retry .
public async Task UpdateOperationAsync(TableOperationError error, JObject item, CancellationToken cancellationToken = default)
        {
            Arguments.IsNotNull(error, nameof(error));
            Arguments.IsNotNull(item, nameof(item));
            if (!await OperationsQueue.UpdateOperationAsync(error.Id, error.OperationVersion, item, cancellationToken).ConfigureAwait(false))
            {
                throw new InvalidOperationException("The operation has been updated and cannot be updated again.");
            }
            await OfflineStore.DeleteAsync(SystemTables.SyncErrors, new[] { error.Id }, cancellationToken).ConfigureAwait(false);
            if (error.OperationKind != TableOperationKind.Delete)
            {
                await OfflineStore.UpsertAsync(error.TableName, new[] { item }, true, cancellationToken).ConfigureAwait(false);
            }
        }
public async Task UpdateOperationAsync ( TableOperationError error , JObject item , CancellationToken cancellationToken = default ) { Arguments . IsNotNull ( error , nameof ( error ) ) ; Arguments . IsNotNull ( item , nameof ( item ) ) ; if ( ! await OperationsQueue . UpdateOperationAsync ( error . Id , error . OperationVersion , item , cancellationToken ) . ConfigureAwait ( false ) ) { throw new InvalidOperationException ( " " ) ; } await OfflineStore . DeleteAsync ( SystemTables . SyncErrors , new [ ] { error . Id } , cancellationToken ) . ConfigureAwait ( false ) ; if ( error . OperationKind != TableOperationKind . Delete ) { await OfflineStore . UpsertAsync ( error . TableName , new [ ] { item } , true , cancellationToken ) . ConfigureAwait ( false ) ; } }
Updates the item within an operation for retry.
Updates the item within an operation for retry .
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 .