Conflicts.ReadCurrentAsync<T> メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
競合の発生元のアイテムを読み取ります。
public abstract System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ItemResponse<T>> ReadCurrentAsync<T> (Microsoft.Azure.Cosmos.ConflictProperties conflict, Microsoft.Azure.Cosmos.PartitionKey partitionKey, System.Threading.CancellationToken cancellationToken = default);
abstract member ReadCurrentAsync : Microsoft.Azure.Cosmos.ConflictProperties * Microsoft.Azure.Cosmos.PartitionKey * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.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))
型パラメーター
- T
パラメーター
- conflict
- ConflictProperties
アイテムを読み取る競合。
- partitionKey
- PartitionKey
項目のパーティション キー。
- cancellationToken
- CancellationToken
(省略可能) CancellationToken 要求の取り消しを表します。
戻り値
Task<ItemResponse<T>>
競合に関連付けられているアイテムの現在の状態。
例
using (FeedIterator<ConflictProperties> conflictIterator = conflicts.GetConflictQueryIterator())
{
while (conflictIterator.HasMoreResults)
{
foreach(ConflictProperties item in await conflictIterator.ReadNextAsync())
{
MyClass intendedChanges = conflicts.ReadConflictContent<MyClass>(item);
ItemResponse<MyClass> currentState = await conflicts.ReadCurrentAsync<MyClass>(item, intendedChanges.MyPartitionKey);
}
}
}
適用対象
こちらもご覧ください
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure SDK for .NET