Skip to content

Commit

Permalink
Documentation: Fixes API comment for RequestOptions.IfMatchEtag (#4249
Browse files Browse the repository at this point in the history
)

* Code changes to update documentation.

* Code changes to add code comment for etag property.

* Code changes to update API docs for ReadItemAsync().

* Code changes to address minor doc correction.

* Code changes to update remarks for patch item async.
  • Loading branch information
kundadebdatta authored Jan 17, 2024
1 parent 4064746 commit 431c6f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Microsoft.Azure.Cosmos/src/RequestOptions/RequestOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public class RequestOptions
/// Gets or sets the If-Match (ETag) associated with the request in the Azure Cosmos DB service.
/// </summary>
/// <remarks>
/// Most commonly used with the Delete* and Replace* methods of <see cref="Container"/> such as <see cref="Container.ReplaceItemAsync{T}(T, string, PartitionKey?, ItemRequestOptions, System.Threading.CancellationToken)"/>
/// but can be used with other methods like <see cref="Container.ReadItemAsync{T}(string, PartitionKey, ItemRequestOptions, System.Threading.CancellationToken)"/> for caching scenarios.
/// Most commonly used with the Delete* and Replace* methods of <see cref="Container"/> such as <see cref="Container.ReplaceItemAsync{T}(T, string, PartitionKey?, ItemRequestOptions, System.Threading.CancellationToken)"/>.
/// </remarks>
public string IfMatchEtag { get; set; }

Expand Down
2 changes: 2 additions & 0 deletions Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ public abstract Task<ResponseMessage> ReadItemStreamAsync(
/// * "_ts": Gets the last modified time stamp associated with the item from the Azure Cosmos DB service.
/// * "_etag": Gets the entity tag associated with the item from the Azure Cosmos DB service.
/// * "ttl": Gets the time to live in seconds of the item in the Azure Cosmos DB service.
/// Note that, this API does not support the usage of <see cref="RequestOptions.IfMatchEtag"/> property at the moment.
/// </remarks>
/// <exception>https://aka.ms/cosmosdb-dot-net-exceptions#typed-api</exception>
/// <example>
Expand Down Expand Up @@ -719,6 +720,7 @@ public abstract Task<FeedResponse<T>> ReadManyItemsAsync<T>(
/// To change an item's partition key value you must delete the original item and insert a new item.
/// The patch operations are atomic and are executed sequentially.
/// By default, resource body will be returned as part of the response. User can request no content by setting <see cref="ItemRequestOptions.EnableContentResponseOnWrite"/> flag to false.
/// Note that, this API does not support the usage of <see cref="RequestOptions.IfMatchEtag"/> property at the moment.
/// </remarks>
/// <param name="id">The Cosmos item id of the item to be patched.</param>
/// <param name="partitionKey"><see cref="PartitionKey"/> for the item</param>
Expand Down

0 comments on commit 431c6f2

Please sign in to comment.