Skip to content

Commit 5e4c0bd

Browse files
authored
Merge branch 'main' into users/pahallis/sdk-emitter-pipelines
2 parents 472d943 + dd38ca7 commit 5e4c0bd

File tree

22 files changed

+73
-39
lines changed

22 files changed

+73
-39
lines changed

eng/common/pipelines/templates/archetype-typespec-emitter.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ extends:
6666
template: /eng/pipelines/templates/stages/1es-redirect.yml
6767
parameters:
6868
stages:
69-
7069
# Build stage
7170
# Responsible for building the autorest generator and typespec emitter packages
7271
# Produces the artifact `build_artifacts` which contains the following:

sdk/core/Azure.Core/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Other Changes
1212

13+
- Use `BinaryData.Empty` for `PipelineResponse.Content` when HTTP message has no content.
14+
1315
## 1.44.1 (2024-10-09)
1416

1517
### Other Changes

sdk/core/Azure.Core/src/Response.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ public abstract class Response : IDisposable
4141
/// </summary>
4242
public virtual ResponseHeaders Headers => new ResponseHeaders(this);
4343

44-
// TODO(matell): The .NET Framework team plans to add BinaryData.Empty in dotnet/runtime#49670, and we can use it then.
45-
private static readonly BinaryData s_EmptyBinaryData = new BinaryData(Array.Empty<byte>());
46-
4744
/// <summary>
4845
/// Gets the contents of HTTP response, if it is available.
4946
/// </summary>
@@ -56,7 +53,7 @@ public virtual BinaryData Content
5653
{
5754
if (ContentStream == null)
5855
{
59-
return s_EmptyBinaryData;
56+
return BinaryData.Empty;
6057
}
6158

6259
MemoryStream? memoryContent = ContentStream as MemoryStream;

sdk/core/System.ClientModel/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Other Changes
1212

13+
- Use `BinaryData.Empty` for `PipelineResponse.Content` when HTTP message has no content ([#46669](https://github.com/Azure/azure-sdk-for-net/pull/46669)).
14+
1315
## 1.2.1 (2024-10-09)
1416

1517
### Bugs Fixed

sdk/core/System.ClientModel/src/Message/PipelineResponse.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ namespace System.ClientModel.Primitives;
1212
/// </summary>
1313
public abstract class PipelineResponse : IDisposable
1414
{
15-
// TODO(matell): The .NET Framework team plans to add BinaryData.Empty in dotnet/runtime#49670, and we can use it then.
16-
internal static readonly BinaryData s_EmptyBinaryData = new(Array.Empty<byte>());
17-
1815
/// <summary>
1916
/// Gets the status code of the HTTP response.
2017
/// </summary>

sdk/core/System.ClientModel/src/Pipeline/HttpClientPipelineTransport.Response.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private async ValueTask<BinaryData> BufferContentSyncOrAsync(CancellationToken c
100100
{
101101
// Content is not buffered but there is no source stream.
102102
// Our contract from Azure.Core is to return BinaryData.Empty in this case.
103-
_bufferedContent = s_EmptyBinaryData;
103+
_bufferedContent = BinaryData.Empty;
104104
return _bufferedContent;
105105
}
106106

sdk/iothub/Azure.ResourceManager.IotHub/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release History
22

3+
## 1.2.0-beta.2 (Unreleased)
4+
5+
### Features Added
6+
7+
### Breaking Changes
8+
9+
### Bugs Fixed
10+
11+
### Other Changes
12+
313
## 1.2.0-beta.1 (2024-10-15)
414

515
### Features Added

sdk/iothub/Azure.ResourceManager.IotHub/src/Azure.ResourceManager.IotHub.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>1.2.0-beta.1</Version>
3+
<Version>1.2.0-beta.2</Version>
44
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
55
<ApiCompatVersion>1.1.1</ApiCompatVersion>
66
<PackageId>Azure.ResourceManager.IotHub</PackageId>

sdk/logic/Azure.ResourceManager.Logic/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release History
22

3+
## 1.2.0-beta.2 (Unreleased)
4+
5+
### Features Added
6+
7+
### Breaking Changes
8+
9+
### Bugs Fixed
10+
11+
### Other Changes
12+
313
## 1.2.0-beta.1 (2024-10-15)
414

515
### Features Added

sdk/logic/Azure.ResourceManager.Logic/src/Azure.ResourceManager.Logic.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<Version>1.2.0-beta.1</Version>
3+
<Version>1.2.0-beta.2</Version>
44
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
55
<ApiCompatVersion>1.1.0</ApiCompatVersion>
66
<PackageId>Azure.ResourceManager.Logic</PackageId>

0 commit comments

Comments
 (0)