Skip to content

Commit

Permalink
Updated naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Willey committed May 7, 2020
1 parent cd0e191 commit 03d1a17
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Microsoft.Azure.Cosmos/src/Batch/ItemBatchOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ internal static Result WriteOperation(ref RowWriter writer, TypeArgument typeArg
}

if (ItemRequestOptions.ShouldSetNoContentHeader(
options.NoContentResponseOnWrite,
options.NoContentResponseOnRead,
options.EnableContentResponseOnWrite,
options.EnableContentResponseOnRead,
operation.OperationType))
{
r = writer.WriteBool("minimalReturnPreference", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class TransactionalBatchItemRequestOptions : RequestOptions
/// <remarks>
/// This is optimal for workloads where the returned resource is not used.
/// </remarks>
public bool? NoContentResponseOnWrite { get; set; }
public bool? EnableContentResponseOnWrite { get; set; }

/// <summary>
/// Gets or sets the boolean to only return the headers and status code in
Expand All @@ -38,7 +38,7 @@ public class TransactionalBatchItemRequestOptions : RequestOptions
/// <remarks>
/// This is optimal for workloads where the returned resource is not used.
/// </remarks>
internal bool? NoContentResponseOnRead { get; set; }
internal bool? EnableContentResponseOnRead { get; set; }

/// <summary>
/// Options to encrypt properties of the item.
Expand All @@ -62,8 +62,8 @@ internal static TransactionalBatchItemRequestOptions FromItemRequestOptions(Item
batchItemRequestOptions.IfMatchEtag = itemRequestOptions.IfMatchEtag;
batchItemRequestOptions.IfNoneMatchEtag = itemRequestOptions.IfNoneMatchEtag;
batchItemRequestOptions.Properties = itemRequestOptions.Properties;
batchItemRequestOptions.NoContentResponseOnWrite = itemRequestOptions.NoContentResponseOnWrite;
batchItemRequestOptions.NoContentResponseOnRead = itemRequestOptions.NoContentResponseOnRead;
batchItemRequestOptions.EnableContentResponseOnWrite = itemRequestOptions.EnableContentResponseOnWrite;
batchItemRequestOptions.EnableContentResponseOnRead = itemRequestOptions.EnableContentResponseOnRead;
batchItemRequestOptions.IsEffectivePartitionKeyRouting = itemRequestOptions.IsEffectivePartitionKeyRouting;
return batchItemRequestOptions;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public ConsistencyLevel? ConsistencyLevel
/// <remarks>
/// This is optimal for workloads where the returned resource is not used.
/// </remarks>
public bool? NoContentResponseOnWrite { get; set; }
public bool? EnableContentResponseOnWrite { get; set; }

/// <summary>
/// Gets or sets the boolean to only return the headers and status code in
Expand All @@ -137,7 +137,7 @@ public ConsistencyLevel? ConsistencyLevel
/// <remarks>
/// This is optimal for workloads where the returned resource is not used.
/// </remarks>
internal bool? NoContentResponseOnRead { get; set; }
internal bool? EnableContentResponseOnRead { get; set; }

/// <summary>
/// Options to encrypt properties of the item.
Expand Down Expand Up @@ -175,8 +175,8 @@ internal override void PopulateRequestOptions(RequestMessage request)
RequestOptions.SetSessionToken(request, this.SessionToken);

if (ItemRequestOptions.ShouldSetNoContentHeader(
this.NoContentResponseOnWrite,
this.NoContentResponseOnRead,
this.EnableContentResponseOnWrite,
this.EnableContentResponseOnRead,
request.OperationType))
{
request.Headers.Add(HttpConstants.HttpHeaders.Prefer, HttpConstants.HttpHeaderValues.PreferReturnMinimal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public async Task ItemCreateNoResponseTest()
{
ItemRequestOptions requestOptions = new ItemRequestOptions()
{
NoContentResponseOnWrite = true
EnableContentResponseOnWrite = true
};

await this.Validate(
Expand All @@ -64,7 +64,7 @@ public async Task ItemReadNoResponseTest()
{
ItemRequestOptions requestOptions = new ItemRequestOptions()
{
NoContentResponseOnRead = true
EnableContentResponseOnRead = true
};

await this.Validate(
Expand Down Expand Up @@ -114,7 +114,7 @@ public async Task ItemStreamCreateNoResponseTest()
{
ItemRequestOptions requestOptions = new ItemRequestOptions()
{
NoContentResponseOnWrite = true
EnableContentResponseOnWrite = true
};

await this.ValidateItemStream(
Expand All @@ -128,7 +128,7 @@ public async Task ItemStreamReadNoResponseTest()
{
ItemRequestOptions requestOptions = new ItemRequestOptions()
{
NoContentResponseOnRead = true
EnableContentResponseOnRead = true
};

await this.ValidateItemStream(
Expand Down Expand Up @@ -197,7 +197,7 @@ public async Task ItemBatchNoResponseTest()
{
TransactionalBatchItemRequestOptions requestOptions = new TransactionalBatchItemRequestOptions()
{
NoContentResponseOnWrite = true
EnableContentResponseOnWrite = true
};

string pkId = "TestBatchId";
Expand Down Expand Up @@ -249,7 +249,7 @@ public async Task ItemBulkNoResponseTest()
{
ItemRequestOptions requestOptions = new ItemRequestOptions()
{
NoContentResponseOnWrite = true
EnableContentResponseOnWrite = true
};

CosmosClient bulkClient = TestCommon.CreateCosmosClient((builder) => builder.WithBulkExecution(true));
Expand Down

0 comments on commit 03d1a17

Please sign in to comment.