/// <summary> /// Refreshes the current claim. /// </summary> /// <remarks> /// This method calls <see cref="IQueueingService.QueryClaimAsync"/> to obtain updated /// information about the current claim, and then synchronously invokes <see cref="RefreshImpl"/> /// to update the current instance to match the results. /// </remarks> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that the task will observe.</param> /// <returns>A <see cref="Task"/> object representing the asynchronous operation.</returns> public Task RefreshAsync(CancellationToken cancellationToken) { Action <Task <Claim> > applyChanges = task => RefreshImpl(task.Result); return(_service.QueryClaimAsync(_queueName, this, cancellationToken).Select(applyChanges)); }