Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestOptions: Fixes Etag code documentation #4949

Merged
merged 6 commits into from
Jan 7, 2025
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Microsoft.Azure.Cosmos/src/RequestOptions/RequestOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,22 @@ 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)"/>.
/// 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)"/>.
kirankumarkolli marked this conversation as resolved.
Show resolved Hide resolved
///
/// <see cref="Container.CreateItemAsync{T}(T, PartitionKey?, ItemRequestOptions, System.Threading.CancellationToken)"/> will ignore <see cref="IfMatchEtag"/> if specificed.
/// </remarks>
public string IfMatchEtag { get; set; }

/// <summary>
/// Most commonly used to detect changes to the resource
/// Gets or sets the If-None-Match (ETag) associated with the request in the Azure Cosmos DB service.
/// </summary>
/// <remarks>
/// Most commonly used to detect changes to the resource
/// Most commonly used with reads such as <see cref="Container.ReadItemAsync{T}(string, PartitionKey, ItemRequestOptions, System.Threading.CancellationToken)"/>.
/// When Item Etag matches the specified <see cref="IfNoneMatchEtag"/> then 304 status code will be returned, otherwise existing Item will be returned with 200.
///
/// To match any Etag use "*"
/// If specified for writes (ex: Create, Replace, Delete) will be ignored.
/// </remarks>
public string IfNoneMatchEtag { get; set; }

Expand Down
Loading