コード例 #1
0
 /// <summary>
 /// Reads the item that originated the conflict.
 /// </summary>
 /// <param name="partitionKey">The partition key for the item.</param>
 /// <param name="cosmosConflict">The conflict for which we want to read the item.</param>
 /// <param name="cancellationToken">(Optional) <see cref="CancellationToken"/> representing request cancellation.</param>
 /// <returns>The current state of the item associated with the conflict.</returns>
 /// <seealso cref="CosmosConflictProperties"/>
 /// <example>
 /// <code language="c#">
 /// <![CDATA[
 /// FeedIterator<CosmosConflictSettings> conflictIterator = await cosmosContainer.Conflicts.GetConflictsIterator();
 /// while (conflictIterator.HasMoreResults)
 /// {
 ///     foreach(CosmosConflictSettings item in await conflictIterator.FetchNextSetAsync())
 ///     {
 ///         MyClass intendedChanges = cosmosContainer.Conflicts.ReadConflictContent<MyClass>(item);
 ///         ItemResponse<MyClass> currentState = await cosmosContainer.Conflicts.ReadCurrentAsync<MyClass>(intendedChanges.MyPartitionKey, item);
 ///     }
 /// }
 /// ]]>
 /// </code>
 /// </example>
 public abstract Task <ItemResponse <T> > ReadCurrentAsync <T>(
     PartitionKey partitionKey,
     CosmosConflictProperties cosmosConflict,
     CancellationToken cancellationToken = default(CancellationToken));
コード例 #2
0
 /// <summary>
 /// Reads the content of the Conflict resource in the Azure Cosmos DB service.
 /// </summary>
 /// <param name="cosmosConflict">The conflict for which we want to read the content of.</param>
 /// <returns>The content of the conflict.</returns>
 /// <seealso cref="CosmosConflictProperties"/>
 /// <example>
 /// <code language="c#">
 /// <![CDATA[
 /// FeedIterator<CosmosConflictSettings> conflictIterator = await cosmosContainer.Conflicts.GetConflictsIterator();
 /// while (conflictIterator.HasMoreResults)
 /// {
 ///     foreach(CosmosConflictSettings item in await conflictIterator.FetchNextSetAsync())
 ///     {
 ///         MyClass intendedChanges = cosmosContainer.Conflicts.ReadConflictContent<MyClass>(item);
 ///         ItemResponse<MyClass> currentState = await cosmosContainer.Conflicts.ReadCurrentAsync<MyClass>(intendedChanges.MyPartitionKey, item);
 ///     }
 /// }
 /// ]]>
 /// </code>
 /// </example>
 public abstract T ReadConflictContent <T>(CosmosConflictProperties cosmosConflict);
コード例 #3
0
 /// <summary>
 /// Delete a conflict from the Azure Cosmos service as an asynchronous operation.
 /// </summary>
 /// <param name="partitionKey">The partition key for the conflict.</param>
 /// <param name="conflict">The conflict to delete.</param>
 /// <param name="cancellationToken">(Optional) <see cref="CancellationToken"/> representing request cancellation.</param>
 /// <returns>A Task representing the asynchronous operation.</returns>
 /// <seealso cref="CosmosConflictProperties"/>
 public abstract Task <CosmosResponseMessage> DeleteConflictAsync(
     PartitionKey partitionKey,
     CosmosConflictProperties conflict,
     CancellationToken cancellationToken = default(CancellationToken));