CosmosConflicts.ReadCurrentAsync<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reads the item that originated the conflict.
public abstract System.Threading.Tasks.Task<Azure.Cosmos.ItemResponse<T>> ReadCurrentAsync<T> (Azure.Cosmos.ConflictProperties conflict, Azure.Cosmos.PartitionKey partitionKey, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadCurrentAsync : Azure.Cosmos.ConflictProperties * Azure.Cosmos.PartitionKey * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Cosmos.ItemResponse<'T>>
Public MustOverride Function ReadCurrentAsync(Of T) (conflict As ConflictProperties, partitionKey As PartitionKey, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ItemResponse(Of T))
Type Parameters
- T
Parameters
- conflict
- ConflictProperties
The conflict for which we want to read the item.
- partitionKey
- PartitionKey
The partition key for the item.
- cancellationToken
- CancellationToken
(Optional) CancellationToken representing request cancellation.
Returns
Task<ItemResponse<T>>
The current state of the item associated with the conflict.
Examples
await foreach(ConflictProperties item in conflicts.GetConflictsAsync())
{
MyClass intendedChanges = conflicts.ReadConflictContent<MyClass>(item);
ItemResponse<MyClass> currentState = await conflicts.ReadCurrentAsync<MyClass>(intendedChanges.MyPartitionKey, item);
}
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Azure SDK for .NET