Skip to content

Azure.Core 2.0/System.ClientModel Integration#41773

Closed
annelo-msft wants to merge 59 commits intoAzure:mainfrom
annelo-msft:core-integration-1
Closed

Azure.Core 2.0/System.ClientModel Integration#41773
annelo-msft wants to merge 59 commits intoAzure:mainfrom
annelo-msft:core-integration-1

Conversation

@annelo-msft
Copy link
Member

@annelo-msft annelo-msft commented Feb 3, 2024

After System.ClientModel GA's, we will update Azure.Core types to use functional implementations that have moved into System.ClientModel types, either by having the Azure.Core type inherit from the corresponding System.ClientModel type, or by internally adapting the System.ClientModel type to the Azure.Core behavior and calling through to the System.ClientModel implementation.

This PR implements the changes to Azure.Core to use functionality implemented in System.ClientModel. It also updates the System.ClientModel test project containing types like models that simulate client types to use nullable annotations for reference types, which will be enabled for ClientModel-based clients so that they can return ClientResult<T?> to indicate that a model is optional on the response.

Azure.Core APIView diff with ClientModel integration
System.ClientModel APIView diff from main <-- no differences

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 6, 2024

API change check

APIView has identified API level changes in this PR and created following API reviews.

Azure.Core
System.ClientModel

=> new AzureCoreResponse<T>(value, response);

/// <summary>
/// Returns the string representation of this <see cref="Response"/>.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Remove DisposeStreamIfNotBuffered when we update the transport response implementations.

annelo-msft added a commit that referenced this pull request Mar 1, 2024
…d transport types (#42294)

* initial checkin

* WIP

* Tables

* updates

* Add tests

* updates

* API updates

* Add ResponseHeadersAdapter

* rework buffering a bit

* revert

* reshuffle

* fix

* add tests

* nits

* nits

* Initial files

* fix build

* update comment on NullableResponse<T>.DefaultResponse

* nits

* use default

* Allow setting message.ResponseClassifier from the base type property

* update exception text

* add test that fails if classifier TryClassify methods are unsealed

* updates

* remove NetworkTimeout logic until we can implement it e2e

* remove NetworkTimeout logic until we can implement it e2e

* add comment to adapter

* address PR feedback

* Initial checkin for policy only

* updates from PR feedback

* make HttpPipelineTransport inherit from PipelineTransport

* export API

* move to full transport implementation

* address feedback from #41773

* fix and export API

* update adapter comment based on pr fb

* Initial files

* call through to response.Headers.Set

* update DigitalTwins with RFE refdoc changes

* add refdoc for RFE
@annelo-msft
Copy link
Member Author

Closing in favor of #42386

@annelo-msft annelo-msft closed this Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants