sdk/dotnet/src/Microsoft.Datasync.Client/Offline/Queue/DeleteOperation.cs
/// <summary>
/// Validates that the operation can collapse with a new operation.
/// </summary>
/// <param name="newOperation">The new operation.</param>
/// <exception cref="InvalidOperationException">when the operation cannot collapse with the new operation.</exception>
Validates that the operation can collapse with a new operation.
Validates that the operation can collapse with a new operation .
public override void ValidateOperationCanCollapse(TableOperation newOperation)
        {
            if (newOperation.ItemId != ItemId)
            {
                throw new ArgumentException($"Cannot collapse delete operation '{Id}' with '{newOperation.Id}' - Item IDs do not match", nameof(newOperation));
            }
            throw new InvalidOperationException($"A delete operation on item '{Id}' is already in the queue.");
        }
public override void ValidateOperationCanCollapse ( TableOperation newOperation ) { if ( newOperation . ItemId != ItemId ) { throw new ArgumentException ( $" Cannot collapse delete operation ' { Id } ' with ' { newOperation . Id } ' - Item IDs do not match " , nameof ( newOperation ) ) ; } throw new InvalidOperationException ( $" A delete operation on item ' { Id } ' is already in the queue. " ) ; }
Validates that the operation can collapse with a new operation.
Validates that the operation can collapse with a new operation .
// We do not allow any operations on an object that has already been deleted.
when the operation cannot collapse with the new operation.
when the operation cannot collapse with the new operation .
newOperation
TableOperation
The new operation.
The new operation .