Microsoft.WindowsAzure.MobileServices.Sync.OperationQueue.DeleteAsync C# (CSharp) Method

DeleteAsync() public method

public DeleteAsync ( string id, long version ) : Task
id string
version long
return Task
        public virtual async Task<bool> DeleteAsync(string id, long version)
        {
            try
            {
                MobileServiceTableOperation op = await GetOperationAsync(id);
                if (op == null || op.Version != version)
                {
                    return false;
                }

                await this.store.DeleteAsync(MobileServiceLocalSystemTables.OperationQueue, id);
                Interlocked.Decrement(ref this.pendingOperations);
                return true;
            }
            catch (Exception ex)
            {
                throw new MobileServiceLocalStoreException("Failed to delete operation from the local store.", ex);
            }
        }