Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4b9682d
Initial files
annelo-msft Feb 3, 2024
1de8c31
updates
annelo-msft Feb 3, 2024
2748b05
updates
annelo-msft Feb 3, 2024
35f2e7f
nits
annelo-msft Feb 3, 2024
af87fe0
nits
annelo-msft Feb 3, 2024
2644b26
nits
annelo-msft Feb 3, 2024
f5c09a1
nits
annelo-msft Feb 3, 2024
28be90b
nits
annelo-msft Feb 5, 2024
3b7641f
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 6, 2024
1d5be20
updates
annelo-msft Feb 6, 2024
7689d55
updates
annelo-msft Feb 6, 2024
9f071bb
updates
annelo-msft Feb 6, 2024
4f5e213
nit
annelo-msft Feb 6, 2024
f56eb5a
update
annelo-msft Feb 6, 2024
d9007f7
update
annelo-msft Feb 6, 2024
f707930
update
annelo-msft Feb 6, 2024
cbb794d
missed file
annelo-msft Feb 6, 2024
897996e
update
annelo-msft Feb 6, 2024
2ec743c
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 14, 2024
99b74b8
client updates
annelo-msft Feb 14, 2024
ebb3442
updates from recent PRs to feature branch
annelo-msft Feb 14, 2024
10be5d2
update
annelo-msft Feb 14, 2024
de10745
updates
annelo-msft Feb 14, 2024
f4c4d25
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 15, 2024
f384e3c
pr fb
annelo-msft Feb 15, 2024
4cbd1eb
fix
annelo-msft Feb 15, 2024
b3646a8
nit
annelo-msft Feb 15, 2024
b0a7ddb
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 26, 2024
2f56c71
update after merge from main
annelo-msft Feb 26, 2024
a3562d4
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 26, 2024
447c966
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 26, 2024
a525bc2
nits
annelo-msft Feb 26, 2024
1dffd97
pr fb
annelo-msft Feb 27, 2024
9dc085b
nits
annelo-msft Feb 27, 2024
207d974
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 27, 2024
b0c7ce8
fix
annelo-msft Feb 27, 2024
fe9839d
nit
annelo-msft Feb 27, 2024
5b8bb53
updates from #42226
annelo-msft Feb 27, 2024
0d1ec89
Merge branch 'core-integration-1' of https://github.com/annelo-msft/a…
annelo-msft Feb 27, 2024
983f669
updates
annelo-msft Feb 27, 2024
0b5b5d6
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 27, 2024
585bfc6
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 27, 2024
f12f597
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 27, 2024
78f57c8
fix merge
annelo-msft Feb 27, 2024
73fca66
post-merge updates
annelo-msft Feb 27, 2024
3f9f594
updates
annelo-msft Feb 27, 2024
d9a2808
export API
annelo-msft Feb 27, 2024
4c1cd7a
updates from Request PR
annelo-msft Feb 28, 2024
5de4f0d
Updates from #42234
annelo-msft Feb 28, 2024
79f831f
Merge remote-tracking branch 'upstream/main' into core-integration-1
annelo-msft Feb 28, 2024
a3548d3
Updates from #42255
annelo-msft Feb 28, 2024
b24647d
Updates from #42262
annelo-msft Feb 29, 2024
23fce2f
updates from #42262
annelo-msft Feb 29, 2024
260ad2b
stay in sync with #42294
annelo-msft Mar 1, 2024
8ec76d2
export API
annelo-msft Mar 1, 2024
d73e12b
updates from #42294
annelo-msft Mar 1, 2024
d3cc683
Remove serialization constructor from ClientResultException
annelo-msft Mar 1, 2024
20bd68a
Remove ClientOptions inheritance; keep in sync with #42329
annelo-msft Mar 2, 2024
0d6820e
updates from #42329
annelo-msft Mar 5, 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" />
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will go back to a package reference once Azure.Core 2.0 GAs.

<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>
4 changes: 3 additions & 1 deletion sdk/core/Azure.Core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 1.39.0-beta.1 (Unreleased)
## 2.0.0-beta.1 (Unreleased)

### Features Added

Expand All @@ -10,6 +10,8 @@

### Other Changes

- Moved Azure.Core types to use functionality implemented in System.ClientModel library.

## 1.38.0 (2024-02-26)

### Features Added
Expand Down
130 changes: 67 additions & 63 deletions sdk/core/Azure.Core/api/Azure.Core.net461.cs

Large diffs are not rendered by default.

130 changes: 67 additions & 63 deletions sdk/core/Azure.Core/api/Azure.Core.net472.cs

Large diffs are not rendered by default.

130 changes: 67 additions & 63 deletions sdk/core/Azure.Core/api/Azure.Core.net6.0.cs

Large diffs are not rendered by default.

130 changes: 67 additions & 63 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
8 changes: 6 additions & 2 deletions sdk/core/Azure.Core/src/Azure.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>This is the implementation of the Azure Client Pipeline</Description>
<AssemblyTitle>Microsoft Azure Client Pipeline</AssemblyTitle>
<Version>1.39.0-beta.1</Version>
<Version>2.0.0-beta.1</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<ApiCompatVersion>1.38.0</ApiCompatVersion>
<PackageTags>Microsoft Azure Client Pipeline</PackageTags>
Expand Down Expand Up @@ -75,4 +75,8 @@
<Compile Include="Shared\TypeReferenceTypeAttribute.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\System.ClientModel\src\System.ClientModel.csproj" />
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will become a package reference after System.ClientModel GA's, which is a prerequisite to merging this PR.

</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;
}
}
}
2 changes: 2 additions & 0 deletions sdk/core/Azure.Core/src/ClientOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace Azure.Core
/// </summary>
public abstract class ClientOptions
{
internal static readonly TimeSpan DefaultNetworkTimeout = TimeSpan.FromSeconds(100);

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

Expand Down
Loading