Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
248 commits
Select commit Hold shift + click to select a range
46396d1
Experiment
annelo-msft Sep 18, 2023
78180ad
dependencies
annelo-msft Sep 18, 2023
902a811
add System.ServiceModel.Rest to ci
annelo-msft Sep 18, 2023
b97e35a
digital twins
annelo-msft Sep 19, 2023
91eb59c
updates
annelo-msft Sep 19, 2023
090d31f
Merge remote-tracking branch 'upstream/main' into users/annelo/core-e…
annelo-msft Sep 19, 2023
8d3beac
revert all changes except for core
m-nash Sep 19, 2023
efe1b6a
update keyvault samples
m-nash Sep 19, 2023
48a7c34
Add TraceSpan
annelo-msft Sep 19, 2023
3be60aa
Add TraceSpan
annelo-msft Sep 19, 2023
c7c13e5
change keyvault samples project to projectref on core
m-nash Sep 19, 2023
44cc398
version funkiness for diagnostics
annelo-msft Sep 19, 2023
591f069
Merge remote-tracking branch 'upstream/main' into users/annelo/core-e…
annelo-msft Sep 19, 2023
e040768
remove TraceSpan types
annelo-msft Sep 19, 2023
4d44a22
export API
annelo-msft Sep 19, 2023
65ceb87
Refactor TryGetHeader on Response
annelo-msft Sep 19, 2023
1d808cf
undo KeyVault
annelo-msft Sep 19, 2023
0b1d586
backout Personalizer
annelo-msft Sep 19, 2023
9239396
undo storage
annelo-msft Sep 19, 2023
a166f4b
undo web pub sub
annelo-msft Sep 19, 2023
31c2156
Add tracing types
annelo-msft Sep 20, 2023
ebf166e
renames
annelo-msft Sep 20, 2023
309bca3
update
annelo-msft Sep 20, 2023
1f0ff1f
Merge remote-tracking branch 'upstream/main' into core-experiment-tel…
annelo-msft Sep 20, 2023
4e6fe10
Remove Credential
annelo-msft Sep 20, 2023
45f5706
API
annelo-msft Sep 20, 2023
fc826bc
refactor
annelo-msft Sep 20, 2023
c3b23b0
remove net461 target
annelo-msft Sep 20, 2023
000d803
Merge remote-tracking branch 'upstream/feature/core-experiment' into …
annelo-msft Sep 20, 2023
6285949
undo kv
annelo-msft Sep 20, 2023
2a1b91b
updates
annelo-msft Sep 20, 2023
0ce2ec5
missed fies
annelo-msft Sep 20, 2023
2bb0d40
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Sep 21, 2023
67c19cc
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Sep 22, 2023
02a8085
What's in Azure.Core.1.36.0-alpha.20230921.5 (#38919)
annelo-msft Sep 22, 2023
7eb8125
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Sep 22, 2023
9fdd766
Make KeyCredentialPolicy public (#38923)
annelo-msft Sep 25, 2023
b18ea47
Add version of StatusCodeClassifier to System.ServiceModel.Rest (#38940)
annelo-msft Sep 25, 2023
997f0c0
move types (#38944)
annelo-msft Sep 27, 2023
31d270e
Extensions for generator (#39021)
annelo-msft Sep 28, 2023
51874db
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Sep 28, 2023
6d4f154
Merge remote-tracking branch 'upstream/feature/core-experiment' into …
annelo-msft Sep 28, 2023
3fad298
add file needed from merging main
annelo-msft Sep 28, 2023
2a4d473
Cleanup of feature branch (#39027)
annelo-msft Sep 28, 2023
ce26c62
Call native sync APIs from LTS target (#39033)
annelo-msft Oct 5, 2023
5cd4450
API cleanup after last PR (#39120)
annelo-msft Oct 7, 2023
50f79a2
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Oct 7, 2023
8eefef3
Reworking the API a bit (#39155)
annelo-msft Oct 9, 2023
7c25917
Move invocation options onto message dictionary (#39179)
annelo-msft Oct 10, 2023
7a2f245
Move options off Pipeline (#39192)
annelo-msft Oct 12, 2023
62ada6e
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Oct 13, 2023
ac021d1
System library response abstraction (#39293)
annelo-msft Oct 16, 2023
2446f6e
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Oct 16, 2023
a8a8842
Rename System.ServiceModel.Rest to System.Net.ClientModel (#39328)
annelo-msft Oct 17, 2023
afa56d5
Clean up after first System.Net.ClientModel beta release (#39335)
annelo-msft Oct 17, 2023
2b57689
Adjust test projects (#39338)
m-nash Oct 17, 2023
ee12a82
Revert "Adjust test projects (#39338)" (#39342)
annelo-msft Oct 18, 2023
48f657f
Add structure for System.Net.ClientModel test projects (#39368)
annelo-msft Oct 18, 2023
f6c43e4
merge main
m-nash Oct 20, 2023
b3a8f64
Feature/model reader writer (#39421)
m-nash Oct 20, 2023
ebe1b31
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Oct 26, 2023
a3c336a
Updates to ClientModel APIs (#39531)
annelo-msft Oct 26, 2023
016030a
Remove Pipeline<TMessage> (#39539)
annelo-msft Oct 27, 2023
57c72d0
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Oct 27, 2023
51b321f
ClientModel: API Updates (#39558)
annelo-msft Oct 27, 2023
19f4435
ClientModel: API Updates (#39563)
annelo-msft Oct 28, 2023
83a41f7
ClientModel: API Updates and new unbranded client sample (#39571)
annelo-msft Oct 30, 2023
8729aee
ClientModel ModelReaderWriter namespaces (#39595)
annelo-msft Oct 30, 2023
00abfda
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Oct 30, 2023
c95ec48
ClientModel: API Updates (#39601)
annelo-msft Oct 30, 2023
668bef3
ClientModel API Updates from BCL feedback (#39651)
annelo-msft Nov 1, 2023
741aac0
ClientModel: NullableResult<T> and Result<T> experiment (#39683)
annelo-msft Nov 1, 2023
a113c03
Revert "ClientModel: NullableResult<T> and Result<T> experiment (#396…
annelo-msft Nov 1, 2023
f1dcd98
Move APIs from the feature/modelReaderWriter branch into the feature/…
annelo-msft Nov 2, 2023
02946ca
ClientModel: Split MessageBody into RequestBody and Response.Content …
annelo-msft Nov 2, 2023
b423bf0
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 3, 2023
d1a9418
Cleanup after MessageBody->RequestBody refactor (#39732)
annelo-msft Nov 3, 2023
aeb2c53
ClientModel: Rename Body to Content (#39748)
annelo-msft Nov 4, 2023
16c827b
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 6, 2023
897a728
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 8, 2023
10da140
ClientModel: API Updates (#39856)
annelo-msft Nov 8, 2023
7afb0e7
Move APIs from the feature/modelReaderWriter branch into the feature/…
annelo-msft Nov 9, 2023
ab9b506
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 10, 2023
3f6b3c3
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 13, 2023
5cf3945
ClientModel: API Updates (#39947)
annelo-msft Nov 13, 2023
7b39685
Move ModelReaderWriter type into ClientModel feature branch (#39964)
annelo-msft Nov 13, 2023
321e6d8
ClientModel: API Updates (#39993)
annelo-msft Nov 15, 2023
9c2a1a4
ClientModel: Add Headers, remove MessageClassifier, from Options type…
annelo-msft Nov 15, 2023
2a63820
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 15, 2023
6ecbca7
Move APIs from the feature/modelReaderWriter branch into the feature/…
annelo-msft Nov 15, 2023
2926dfe
ClientModel: API Updates (#40032)
annelo-msft Nov 16, 2023
0f9d39a
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 17, 2023
832bc8e
ClientModel: API Updates from BCL Feedback on KeyCredential (#40093)
annelo-msft Nov 17, 2023
f5d067c
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 20, 2023
4fe3c8e
ClientModel: Non-freezable Options (#40097)
annelo-msft Nov 20, 2023
62fa900
ClientModel: Remove types in .Internals namespaces (#40129)
annelo-msft Nov 20, 2023
1e70734
ClientModel: Remove types in .Internals.Primitives namespace (#40151)
annelo-msft Nov 21, 2023
ea279cc
ClientModel: Remove types in .Internals.Primitives namespace (#40158)
annelo-msft Nov 22, 2023
0c3d6c4
Tidy up after internals reshuffling (#40165)
annelo-msft Nov 27, 2023
4b40ad7
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 27, 2023
05cca42
ClientModel: ModelReaderWriter follow-ups (#40305)
annelo-msft Nov 27, 2023
3974f06
ClientModel: API Updates (#40354)
annelo-msft Nov 29, 2023
9a13882
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Nov 29, 2023
af1cf6f
nit
annelo-msft Nov 29, 2023
73aa29f
ClientModel: Rework some of the Azure.Core dependencies (#40407)
annelo-msft Nov 30, 2023
5f58f73
ClientModel: Rework Request and Response hierarchy (#40447)
annelo-msft Dec 1, 2023
5e1868a
ClientModel: Rework Response and Response<T> hierarchy in Azure.Core …
annelo-msft Dec 4, 2023
1a4fc4f
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Dec 5, 2023
61f6f68
ClientModel: Rework Request (#40576)
annelo-msft Dec 5, 2023
d43f404
ClientModel: Rework ClientRequestException API (#40590)
annelo-msft Dec 6, 2023
bc26140
Comparison of ClientModel and Azure.Core-based clients and end-user U…
annelo-msft Dec 6, 2023
e943e71
ClientModel: API Updates (#40644)
annelo-msft Dec 8, 2023
5693fc3
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Dec 8, 2023
f21070c
ClientModel: API Updates (#40664)
annelo-msft Dec 8, 2023
ccd7984
ClientModel: Rework MessageHeaders API (#40627)
annelo-msft Dec 8, 2023
a99fe40
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Dec 11, 2023
bc5abb2
fix build break after merge
annelo-msft Dec 11, 2023
bb384f4
ClientModel: KeyCredentialAuthenticationPolicy API updates (#40705)
annelo-msft Dec 11, 2023
4b85d5a
ClientModel: Remove RequestOptions.Apply (#40706)
annelo-msft Dec 12, 2023
c44b9ab
ClientModel: Add Retries to Pipeline (#40308)
annelo-msft Dec 12, 2023
48a8f2a
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Dec 13, 2023
55fce52
ClientModel: Rework PipelineProcessor (#40691)
annelo-msft Dec 13, 2023
a79b2ed
ClientModel: API Updates (#40776)
annelo-msft Dec 14, 2023
592221f
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Dec 14, 2023
e2be873
fix after merge from main
annelo-msft Dec 14, 2023
a418200
more updates from MRW changes
annelo-msft Dec 14, 2023
663d17d
ClientModel: Add tests for ClientModel types (#40777)
annelo-msft Dec 15, 2023
2f12512
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Dec 15, 2023
72ef7b5
ClientModel: Add tests for ClientModel types (#40793)
annelo-msft Dec 15, 2023
0278974
ClientModel: Add tests for ClientModel types (#40809)
annelo-msft Dec 16, 2023
71ad4ed
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 2, 2024
99fa444
Fix build after merging main
annelo-msft Jan 2, 2024
4c21277
ClientModel: Add tests for ClientModel types (#40819)
annelo-msft Jan 2, 2024
8576268
ClientModel: Add tests for ClientModel types (#40957)
annelo-msft Jan 3, 2024
04d7b9d
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 3, 2024
42aceaf
WIP
annelo-msft Jan 4, 2024
56d4480
Change response buffering so it doesn't depend on policy
annelo-msft Jan 4, 2024
85f234d
Updates/naming
annelo-msft Jan 4, 2024
5655d1a
Add result tests
annelo-msft Jan 4, 2024
e8bc418
Export API
annelo-msft Jan 4, 2024
511553d
test fix
annelo-msft Jan 4, 2024
65e949d
Add tests for Exception
annelo-msft Jan 4, 2024
c54f476
buffering test
annelo-msft Jan 4, 2024
f0ff36f
more tests
annelo-msft Jan 4, 2024
9e0db26
Rename ClientRequestException -> ClientResultException
annelo-msft Jan 4, 2024
763c49a
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 4, 2024
b7ae300
Merge remote-tracking branch 'upstream/main' into clientmodel-conveni…
annelo-msft Jan 4, 2024
f53942a
Merge remote-tracking branch 'origin/clientmodel-convenience-apis' in…
annelo-msft Jan 4, 2024
dadc016
Rename PipelineOptions to ClientPipelineOptions
annelo-msft Jan 4, 2024
c786576
fix merge
annelo-msft Jan 4, 2024
52aed27
fix merge
annelo-msft Jan 4, 2024
62a8ce2
fix merge
annelo-msft Jan 4, 2024
a5faffd
export API and fix digitaltwins
annelo-msft Jan 4, 2024
7763ba1
Move buffering logic into response
annelo-msft Jan 5, 2024
d821d8b
Make result types non-abstract
annelo-msft Jan 5, 2024
29205ce
Update ClientResultException constructor APIs
annelo-msft Jan 5, 2024
0565e3d
fb on PR 41016
annelo-msft Jan 6, 2024
8c949ab
fb on PR 41016
annelo-msft Jan 6, 2024
ccf282a
change APIs on KeyCredential
annelo-msft Jan 6, 2024
d38ae23
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 8, 2024
0d7f6f5
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 9, 2024
74ab94d
Renames from APIView feedback
annelo-msft Jan 9, 2024
81d254d
Make PipelineResponse.Content property virtual
annelo-msft Jan 9, 2024
92bfaa5
MessageDelay renames
annelo-msft Jan 9, 2024
700075c
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 9, 2024
9804ba2
Make ClientOptions inherit from ClientPipelineOptions
annelo-msft Jan 9, 2024
b30caec
Keep files in sync with PR to main
annelo-msft Jan 10, 2024
43bea9d
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 11, 2024
db796b4
API updates for buffering policy static methods
annelo-msft Jan 11, 2024
20ed1d4
API renames per APIView comments
annelo-msft Jan 11, 2024
4827065
API renames per APIView comments: ApiKeyAuth policy
annelo-msft Jan 11, 2024
1f9e65d
fix build
annelo-msft Jan 11, 2024
7da4e1c
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 12, 2024
456060e
keep feature branch in sync with PRs
annelo-msft Jan 12, 2024
f56416b
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 12, 2024
7fbeb1b
Keep feature branch in sync with outstanding PRs
annelo-msft Jan 12, 2024
d284ce0
Keep in sync with outstanding PRs and make PipelineMessage properties…
annelo-msft Jan 13, 2024
a32ba49
move ReadTimeoutStream functionality into ClientModel response buffering
annelo-msft Jan 16, 2024
b6af5c6
Modify unit tests relying on internal implementation details
annelo-msft Jan 16, 2024
16336d8
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 16, 2024
cbb8fce
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 16, 2024
8621dd9
Make ResponseStatusClassifier internal
annelo-msft Jan 16, 2024
a4953a9
Fix and tests
annelo-msft Jan 16, 2024
2fb4023
fix bug and add tests
annelo-msft Jan 16, 2024
9f4be8f
fix
annelo-msft Jan 16, 2024
b9ddaad
export API
annelo-msft Jan 16, 2024
63c8707
ClientModel Prototype: Make ResponseStatusClassifier internal (#41303)
annelo-msft Jan 17, 2024
358fa56
updates
annelo-msft Jan 17, 2024
90598fb
Merge branch 'clientmodel-setheader' into feature/core-experiment
annelo-msft Jan 17, 2024
85f9e10
missed files
annelo-msft Jan 17, 2024
68ed727
bring feature branch into sync with outstanding PRs
annelo-msft Jan 17, 2024
d6a9354
ClientModel Prototype: Remove MessageDelay (#41358)
annelo-msft Jan 17, 2024
6c33ba9
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 17, 2024
3607784
pipeline functional tests in progress
annelo-msft Jan 17, 2024
25cc628
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 17, 2024
9f04dae
update feature branch with latest PR
annelo-msft Jan 18, 2024
1e87084
update feature branch with latest PR
annelo-msft Jan 18, 2024
e7e4adc
Back out jitter until it can be addressed in https://github.com/Azure…
annelo-msft Jan 18, 2024
f3ccba5
pr fb and some tidy up
annelo-msft Jan 18, 2024
79bc643
Add ServicePointHelpers and un-ignore parallel connection test
annelo-msft Jan 18, 2024
630dd79
keep in sync with PR branch
annelo-msft Jan 18, 2024
0beaf8b
keep in sync with PR branch
annelo-msft Jan 19, 2024
89bc447
keep in sync with PR branch
annelo-msft Jan 19, 2024
b081693
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 19, 2024
738df41
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 19, 2024
049b872
fix build break
annelo-msft Jan 19, 2024
a952413
Initial work to split header types (#41401)
annelo-msft Jan 19, 2024
4b1a3e4
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 19, 2024
bab8b00
keep in sync with PR branch
annelo-msft Jan 19, 2024
a507cff
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 20, 2024
296952f
revert unchanged files
annelo-msft Jan 20, 2024
adc091e
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 22, 2024
3cc8a1d
Keep feature branch in sync with outstanding PRs
annelo-msft Jan 23, 2024
a993fbc
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 23, 2024
324f62a
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 23, 2024
9815fd0
ClientModel: Update Azure.Core to use Task for Wait (#41462)
annelo-msft Jan 23, 2024
6308352
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 25, 2024
7109662
Azure.Core 2.0: Make Azure.Core ClientOptions freezable (#41428)
annelo-msft Jan 25, 2024
00d7d13
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 25, 2024
f3e504f
ClientModel Prototype: Evaluate using nullable annotations instead of…
annelo-msft Jan 25, 2024
f677b98
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 26, 2024
5cef2b3
ClientModel and Core: Make MesageClassifier composable (#41595)
annelo-msft Jan 26, 2024
2cadf75
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 26, 2024
e903719
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 29, 2024
457c2d3
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 29, 2024
3c00358
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Jan 30, 2024
7f2f0d9
ClientModel prototype: validate API changes (#41644)
annelo-msft Jan 30, 2024
eb128ad
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 3, 2024
2641c12
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 6, 2024
813679b
small tidy-up
annelo-msft Feb 6, 2024
99d0959
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 6, 2024
098fa04
Add ExtractResponse method to Azure.Core's HttpMessage in Azure.Core/…
annelo-msft Feb 7, 2024
659f178
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 7, 2024
b4af067
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 7, 2024
b3b1425
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 10, 2024
5ede910
Core 2.0 Prototype: Merge "move buffering" and "response.Content" to …
annelo-msft Feb 13, 2024
100dfab
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 13, 2024
79bdac1
ClientModel Prototype: Nullable annotations in clients (#41968)
annelo-msft Feb 14, 2024
8edd3c4
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 14, 2024
272b50f
updates for demo client comparison
annelo-msft Feb 14, 2024
08b0a21
update tables error parser
annelo-msft Feb 14, 2024
0ffb8ec
updates from PR to main
annelo-msft Feb 14, 2024
59e6fa3
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 15, 2024
c5ef0a5
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 16, 2024
372a6d6
Core2: API changes to address newslot properties (#42001)
annelo-msft Feb 16, 2024
2eeeeb9
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 26, 2024
d63c936
updates
annelo-msft Feb 26, 2024
628f79a
Merge remote-tracking branch 'upstream/main' into feature/core-experi…
annelo-msft Feb 26, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<IncludeOperationsSharedSource>true</IncludeOperationsSharedSource>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Core" />
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NUnit" />
Expand Down Expand Up @@ -40,4 +39,8 @@
<_Parameter2>$(NuGetPackageRoot)\azure.sdk.tools.testproxy\$(TestProxyVersion)\tools\net6.0\any\Azure.Sdk.Tools.TestProxy.dll</_Parameter2>
</AssemblyAttribute>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Azure.Core\src\Azure.Core.csproj" />
</ItemGroup>
</Project>
135 changes: 69 additions & 66 deletions sdk/core/Azure.Core/api/Azure.Core.net461.cs

Large diffs are not rendered by default.

135 changes: 69 additions & 66 deletions sdk/core/Azure.Core/api/Azure.Core.net472.cs

Large diffs are not rendered by default.

1,176 changes: 0 additions & 1,176 deletions sdk/core/Azure.Core/api/Azure.Core.net5.0.cs

This file was deleted.

135 changes: 69 additions & 66 deletions sdk/core/Azure.Core/api/Azure.Core.net6.0.cs

Large diffs are not rendered by default.

1,173 changes: 0 additions & 1,173 deletions sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs

This file was deleted.

135 changes: 69 additions & 66 deletions sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sdk/core/Azure.Core/samples/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ internal class GlobalTimeoutRetryPolicy : RetryPolicy
_timeout = timeout;
}

protected internal override bool ShouldRetry(HttpMessage message, Exception exception)
protected override bool ShouldRetry(HttpMessage message, Exception exception)
{
return ShouldRetryInternalAsync(message, exception, false).EnsureCompleted();
}
protected internal override ValueTask<bool> ShouldRetryAsync(HttpMessage message, Exception exception)
protected override ValueTask<bool> ShouldRetryAsync(HttpMessage message, Exception exception)
{
return ShouldRetryInternalAsync(message, exception, true);
}
Expand Down
5 changes: 5 additions & 0 deletions sdk/core/Azure.Core/src/Azure.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
<Compile Include="Shared\CancellationHelper.cs" />
<Compile Include="Shared\OperationPoller.cs" />
<Compile Include="Shared\TypeReferenceTypeAttribute.cs" />
<Compile Include="..\..\System.ClientModel\src\Internal\BitVector640.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\System.ClientModel\src\System.ClientModel.csproj" />
</ItemGroup>

</Project>
36 changes: 10 additions & 26 deletions sdk/core/Azure.Core/src/AzureKeyCredential.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.ClientModel;
using System.ComponentModel;
using System.Threading;
using Azure.Core;

namespace Azure
{
/// <summary>
/// Key credential used to authenticate to an Azure Service.
/// It provides the ability to update the key without creating a new client.
/// </summary>
public class AzureKeyCredential
public class AzureKeyCredential : ApiKeyCredential
{
private string _key;

/// <summary>
/// Key used to authenticate to an Azure service.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public string Key
{
get => Volatile.Read(ref _key);
private set => Volatile.Write(ref _key, value);
get
{
Deconstruct(out string key);
return key;
}

private set => Update(value);
}

/// <summary>
Expand All @@ -35,26 +37,8 @@ public string Key
/// <exception cref="System.ArgumentException">
/// Thrown when the <paramref name="key"/> is empty.
/// </exception>
#pragma warning disable CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable.
public AzureKeyCredential(string key) => Update(key);
#pragma warning restore CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable.

/// <summary>
/// Updates the service key.
/// This is intended to be used when you've regenerated your service key
/// and want to update long lived clients.
/// </summary>
/// <param name="key">Key to authenticate the service against.</param>
/// <exception cref="System.ArgumentNullException">
/// Thrown when the <paramref name="key"/> is null.
/// </exception>
/// <exception cref="System.ArgumentException">
/// Thrown when the <paramref name="key"/> is empty.
/// </exception>
public void Update(string key)
public AzureKeyCredential(string key) : base(key)
{
Argument.AssertNotNullOrEmpty(key, nameof(key));
Key = key;
}
}
}
35 changes: 32 additions & 3 deletions sdk/core/Azure.Core/src/ClientOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using System;
using System.ClientModel.Primitives;
using System.Collections.Generic;
using System.ComponentModel;
using Azure.Core.Pipeline;
Expand All @@ -11,11 +12,15 @@ namespace Azure.Core
/// <summary>
/// Base type for all client option types, exposes various common client options like <see cref="Diagnostics"/>, <see cref="Retry"/>, <see cref="Transport"/>.
/// </summary>
public abstract class ClientOptions
public abstract class ClientOptions : ClientPipelineOptions
{
internal static readonly TimeSpan DefaultNetworkTimeout = TimeSpan.FromSeconds(100);

private HttpPipelineTransport _transport;
internal bool IsCustomTransportSet { get; private set; }

private HttpPipelinePolicy? _retryPolicy;

/// <summary>
/// Gets the default set of <see cref="ClientOptions"/>. Changes to the <see cref="Default"/> options would be reflected
/// in new instances of <see cref="ClientOptions"/> type created after changes to <see cref="Default"/> were made.
Expand Down Expand Up @@ -71,11 +76,13 @@ internal ClientOptions(ClientOptions? clientOptions, DiagnosticsOptions? diagnos
/// <summary>
/// The <see cref="HttpPipelineTransport"/> to be used for this client. Defaults to an instance of <see cref="HttpClientTransport"/>.
/// </summary>
public HttpPipelineTransport Transport
public new HttpPipelineTransport Transport
{
get => _transport;
set
{
AssertNotFrozen();

_transport = value ?? throw new ArgumentNullException(nameof(value));
IsCustomTransportSet = true;
}
Expand All @@ -97,7 +104,16 @@ public HttpPipelineTransport Transport
/// If <see cref="RetryPolicy.Process"/> is overridden or a custom <see cref="HttpPipelinePolicy"/> is specified,
/// it is the implementer's responsibility to update the <see cref="HttpMessage.ProcessingContext"/> values.
/// </summary>
public HttpPipelinePolicy? RetryPolicy { get; set; }
public new HttpPipelinePolicy? RetryPolicy
{
get => _retryPolicy;
set
{
AssertNotFrozen();

_retryPolicy = value;
}
}

/// <summary>
/// Adds an <see cref="HttpPipeline"/> policy into the client pipeline. The position of policy in the pipeline is controlled by the <paramref name="position"/> parameter.
Expand All @@ -108,6 +124,8 @@ public HttpPipelineTransport Transport
/// <param name="position">The position of policy in the pipeline.</param>
public void AddPolicy(HttpPipelinePolicy policy, HttpPipelinePosition position)
{
AssertNotFrozen();

if (position != HttpPipelinePosition.PerCall &&
position != HttpPipelinePosition.PerRetry &&
position != HttpPipelinePosition.BeforeTransport)
Expand All @@ -132,5 +150,16 @@ public void AddPolicy(HttpPipelinePolicy policy, HttpPipelinePosition position)
/// <inheritdoc />
[EditorBrowsable(EditorBrowsableState.Never)]
public override string? ToString() => base.ToString();

/// <summary>
/// TBD.
/// </summary>
public override void Freeze()
{
Diagnostics.Freeze();
Retry.Freeze();

base.Freeze();
}
}
}
48 changes: 26 additions & 22 deletions sdk/core/Azure.Core/src/DelayStrategy.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable enable

using System;
using Azure.Core.Pipeline;

Expand All @@ -11,15 +9,14 @@ namespace Azure.Core
/// <summary>
/// An abstraction to control delay behavior.
/// </summary>
#pragma warning disable AZC0012 // Avoid single word type names
public abstract class DelayStrategy
#pragma warning restore AZC0012 // Avoid single word type names
{
internal const double DefaultJitterFactor = 0.2;

private readonly Random _random = new ThreadSafeRandom();
private readonly double _minJitterFactor;
private readonly double _maxJitterFactor;
private readonly TimeSpan _maxDelay;
internal const double DefaultJitterFactor = 0.2;

/// <summary>
/// Constructs a new instance of <see cref="DelayStrategy"/>. This constructor can be used by derived classes to customize the jitter factor and max delay.
Expand All @@ -29,10 +26,11 @@ public abstract class DelayStrategy
/// delay used will be a random double between 0.8 and 1.2. If set to 0, no jitter will be applied.</param>
protected DelayStrategy(TimeSpan? maxDelay = default, double jitterFactor = DefaultJitterFactor)
{
_minJitterFactor = 1.0 - jitterFactor;
_maxJitterFactor = 1.0 + jitterFactor;

// use same defaults as RetryOptions
_minJitterFactor = 1 - jitterFactor;
_maxJitterFactor = 1 + jitterFactor;
_maxDelay = maxDelay ?? TimeSpan.FromMinutes(1);
_maxDelay = maxDelay ?? RetryOptions.DefaultMaxDelay;
}

/// <summary>
Expand All @@ -45,19 +43,19 @@ public static DelayStrategy CreateExponentialDelayStrategy(
TimeSpan? initialDelay = default,
TimeSpan? maxDelay = default)
{
return new ExponentialDelayStrategy(initialDelay ?? TimeSpan.FromSeconds(0.8), maxDelay ?? TimeSpan.FromMinutes(1));
initialDelay ??= RetryOptions.DefaultInitialDelay;
maxDelay ??= RetryOptions.DefaultMaxDelay;

return new ExponentialDelayStrategy(initialDelay, maxDelay);
}

/// <summary>
/// Constructs a fixed delay with jitter.
/// </summary>
/// <param name="delay">The delay to use.</param>
/// <returns>The <see cref="DelayStrategy"/> instance.</returns>
public static DelayStrategy CreateFixedDelayStrategy(
TimeSpan? delay = default)
{
return new FixedDelayStrategy(delay ?? TimeSpan.FromSeconds(0.8));
}
public static DelayStrategy CreateFixedDelayStrategy(TimeSpan? delay = default)
=> new FixedDelayStrategy(delay ?? RetryOptions.DefaultInitialDelay);

/// <summary>
/// Gets the next delay interval. Implement this method to provide custom delay logic.
Expand All @@ -74,12 +72,16 @@ public static DelayStrategy CreateFixedDelayStrategy(
/// <param name="response">The response, if any, returned from the service.</param>
/// <param name="retryNumber">The retry number.</param>
/// <returns>A <see cref="TimeSpan"/> representing the next delay interval.</returns>
public TimeSpan GetNextDelay(Response? response, int retryNumber) =>
Max(
response?.Headers.RetryAfter ?? TimeSpan.Zero,
Min(
ApplyJitter(GetNextDelayCore(response, retryNumber)),
_maxDelay));
public TimeSpan GetNextDelay(Response? response, int retryNumber)
{
TimeSpan retryAfter = response?.Headers.RetryAfter ?? TimeSpan.Zero;

TimeSpan defaultDelay = GetNextDelayCore(response, retryNumber);
TimeSpan defaultWithJitter = ApplyJitter(defaultDelay);
TimeSpan cappedDefault = Min(defaultWithJitter, _maxDelay);

return Max(retryAfter, cappedDefault);
}

private TimeSpan ApplyJitter(TimeSpan delay)
{
Expand All @@ -99,14 +101,16 @@ private TimeSpan ApplyJitter(TimeSpan delay)
/// <param name="val1">The first value.</param>
/// <param name="val2">The second value.</param>
/// <returns>The maximum of the two <see cref="TimeSpan"/> values.</returns>
protected static TimeSpan Max(TimeSpan val1, TimeSpan val2) => val1 > val2 ? val1 : val2;
protected static TimeSpan Max(TimeSpan val1, TimeSpan val2)
=> val1 > val2 ? val1 : val2;

/// <summary>
/// Gets the minimum of two <see cref="TimeSpan"/> values.
/// </summary>
/// <param name="val1">The first value.</param>
/// <param name="val2">The second value.</param>
/// <returns>The minimum of the two <see cref="TimeSpan"/> values.</returns>
protected static TimeSpan Min(TimeSpan val1, TimeSpan val2) => val1 < val2 ? val1 : val2;
protected static TimeSpan Min(TimeSpan val1, TimeSpan val2)
=> val1 < val2 ? val1 : val2;
}
}
Loading