diff --git a/sdk/core/Azure.Core.TestFramework/src/Azure.Core.TestFramework.csproj b/sdk/core/Azure.Core.TestFramework/src/Azure.Core.TestFramework.csproj
index df96d31e9076..519da9c09fa5 100644
--- a/sdk/core/Azure.Core.TestFramework/src/Azure.Core.TestFramework.csproj
+++ b/sdk/core/Azure.Core.TestFramework/src/Azure.Core.TestFramework.csproj
@@ -4,7 +4,6 @@
true
-
@@ -40,4 +39,8 @@
<_Parameter2>$(NuGetPackageRoot)\azure.sdk.tools.testproxy\$(TestProxyVersion)\tools\net6.0\any\Azure.Sdk.Tools.TestProxy.dll
+
+
+
+
diff --git a/sdk/core/Azure.Core/CHANGELOG.md b/sdk/core/Azure.Core/CHANGELOG.md
index 90e4b1135487..0c4a1b7a933c 100644
--- a/sdk/core/Azure.Core/CHANGELOG.md
+++ b/sdk/core/Azure.Core/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 1.39.0-beta.1 (Unreleased)
+## 2.0.0-beta.1 (Unreleased)
### Features Added
@@ -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
diff --git a/sdk/core/Azure.Core/api/Azure.Core.net461.cs b/sdk/core/Azure.Core/api/Azure.Core.net461.cs
index 7d6246afcef8..546bf228f884 100644
--- a/sdk/core/Azure.Core/api/Azure.Core.net461.cs
+++ b/sdk/core/Azure.Core/api/Azure.Core.net461.cs
@@ -23,12 +23,11 @@ public static partial class AzureCoreExtensions
public static object? ToObjectFromJson(this System.BinaryData data) { throw null; }
public static T? ToObject(this System.BinaryData data, Azure.Core.Serialization.ObjectSerializer serializer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
- public partial class AzureKeyCredential
+ public partial class AzureKeyCredential : System.ClientModel.ApiKeyCredential
{
- public AzureKeyCredential(string key) { }
+ public AzureKeyCredential(string key) : base (default(string)) { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public string Key { get { throw null; } }
- public void Update(string key) { }
}
public partial class AzureNamedKeyCredential
{
@@ -115,16 +114,17 @@ public MatchConditions() { }
public Azure.ETag? IfMatch { get { throw null; } set { } }
public Azure.ETag? IfNoneMatch { get { throw null; } set { } }
}
- public abstract partial class NullableResponse
+ public abstract partial class NullableResponse : System.ClientModel.ClientResult
{
- protected NullableResponse() { }
- public abstract bool HasValue { get; }
- public abstract T? Value { get; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ protected NullableResponse() : base (default(T), default(System.ClientModel.Primitives.PipelineResponse)) { }
+ protected NullableResponse(T? value, Azure.Response response) : base (default(T), default(System.ClientModel.Primitives.PipelineResponse)) { }
+ public virtual bool HasValue { get { throw null; } }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override bool Equals(object? obj) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override int GetHashCode() { throw null; }
- public abstract Azure.Response GetRawResponse();
+ public virtual new Azure.Response GetRawResponse() { throw null; }
public override string ToString() { throw null; }
}
public abstract partial class Operation
@@ -209,47 +209,45 @@ public RequestConditions() { }
public System.DateTimeOffset? IfModifiedSince { get { throw null; } set { } }
public System.DateTimeOffset? IfUnmodifiedSince { get { throw null; } set { } }
}
- public partial class RequestContext
+ public partial class RequestContext : System.ClientModel.Primitives.RequestOptions
{
public RequestContext() { }
- public System.Threading.CancellationToken CancellationToken { get { throw null; } set { } }
- public Azure.ErrorOptions ErrorOptions { get { throw null; } set { } }
+ public new Azure.ErrorOptions ErrorOptions { get { throw null; } set { } }
public void AddClassifier(Azure.Core.ResponseClassificationHandler classifier) { }
public void AddClassifier(int statusCode, bool isError) { }
public void AddPolicy(Azure.Core.Pipeline.HttpPipelinePolicy policy, Azure.Core.HttpPipelinePosition position) { }
+ protected override void Apply(System.ClientModel.Primitives.PipelineMessage message) { }
public static implicit operator Azure.RequestContext (Azure.ErrorOptions options) { throw null; }
}
- public partial class RequestFailedException : System.Exception, System.Runtime.Serialization.ISerializable
+ public partial class RequestFailedException : System.ClientModel.ClientResultException, System.Runtime.Serialization.ISerializable
{
- public RequestFailedException(Azure.Response response) { }
- public RequestFailedException(Azure.Response response, System.Exception? innerException) { }
- public RequestFailedException(Azure.Response response, System.Exception? innerException, Azure.Core.RequestFailedDetailsParser? detailsParser) { }
+ public RequestFailedException(Azure.Response response) : base (default(System.ClientModel.Primitives.PipelineResponse), default(System.Exception)) { }
+ public RequestFailedException(Azure.Response response, System.Exception? innerException) : base (default(System.ClientModel.Primitives.PipelineResponse), default(System.Exception)) { }
+ public RequestFailedException(Azure.Response response, System.Exception? innerException, Azure.Core.RequestFailedDetailsParser? detailsParser) : base (default(System.ClientModel.Primitives.PipelineResponse), default(System.Exception)) { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public RequestFailedException(int status, string message) { }
+ public RequestFailedException(int status, string message) : base (default(System.ClientModel.Primitives.PipelineResponse), default(System.Exception)) { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public RequestFailedException(int status, string message, System.Exception? innerException) { }
+ public RequestFailedException(int status, string message, System.Exception? innerException) : base (default(System.ClientModel.Primitives.PipelineResponse), default(System.Exception)) { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public RequestFailedException(int status, string message, string? errorCode, System.Exception? innerException) { }
- protected RequestFailedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
- public RequestFailedException(string message) { }
- public RequestFailedException(string message, System.Exception? innerException) { }
+ public RequestFailedException(int status, string message, string? errorCode, System.Exception? innerException) : base (default(System.ClientModel.Primitives.PipelineResponse), default(System.Exception)) { }
+ protected RequestFailedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base (default(System.ClientModel.Primitives.PipelineResponse), default(System.Exception)) { }
+ public RequestFailedException(string message) : base (default(System.ClientModel.Primitives.PipelineResponse), default(System.Exception)) { }
+ public RequestFailedException(string message, System.Exception? innerException) : base (default(System.ClientModel.Primitives.PipelineResponse), default(System.Exception)) { }
public string? ErrorCode { get { throw null; } }
- public int Status { get { throw null; } }
+ public static System.Threading.Tasks.ValueTask CreateAsync(Azure.Response response, Azure.Core.RequestFailedDetailsParser? detailsParser = null, System.Exception? innerException = null) { throw null; }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
- public Azure.Response? GetRawResponse() { throw null; }
+ public new Azure.Response? GetRawResponse() { throw null; }
}
- public abstract partial class Response : System.IDisposable
+ public abstract partial class Response : System.ClientModel.Primitives.PipelineResponse
{
protected Response() { }
public abstract string ClientRequestId { get; set; }
- public virtual System.BinaryData Content { get { throw null; } }
- public abstract System.IO.Stream? ContentStream { get; set; }
- public virtual Azure.Core.ResponseHeaders Headers { get { throw null; } }
- public virtual bool IsError { get { throw null; } }
- public abstract string ReasonPhrase { get; }
- public abstract int Status { get; }
+ public override System.BinaryData Content { get { throw null; } }
+ public virtual new Azure.Core.ResponseHeaders Headers { get { throw null; } }
+ protected override System.ClientModel.Primitives.PipelineResponseHeaders HeadersCore { get { throw null; } }
+ public override System.BinaryData BufferContent(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public override System.Threading.Tasks.ValueTask BufferContentAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
protected internal abstract bool ContainsHeader(string name);
- public abstract void Dispose();
protected internal abstract System.Collections.Generic.IEnumerable EnumerateHeaders();
public static Azure.Response FromValue(T value, Azure.Response response) { throw null; }
public override string ToString() { throw null; }
@@ -265,7 +263,9 @@ public ResponseError(string? code, string? message) { }
}
public abstract partial class Response : Azure.NullableResponse
{
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
protected Response() { }
+ protected Response(T value, Azure.Response response) { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override bool HasValue { get { throw null; } }
public override T Value { get { throw null; } }
@@ -488,23 +488,18 @@ public static partial class Names
public static string XMsRequestId { get { throw null; } }
}
}
- public sealed partial class HttpMessage : System.IDisposable
+ public sealed partial class HttpMessage : System.ClientModel.Primitives.PipelineMessage
{
- public HttpMessage(Azure.Core.Request request, Azure.Core.ResponseClassifier responseClassifier) { }
- public bool BufferResponse { get { throw null; } set { } }
- public System.Threading.CancellationToken CancellationToken { get { throw null; } }
+ public HttpMessage(Azure.Core.Request request, Azure.Core.ResponseClassifier responseClassifier) : base (default(System.ClientModel.Primitives.PipelineRequest)) { }
public bool HasResponse { get { throw null; } }
- public System.TimeSpan? NetworkTimeout { get { throw null; } set { } }
public Azure.Core.MessageProcessingContext ProcessingContext { get { throw null; } }
- public Azure.Core.Request Request { get { throw null; } }
- public Azure.Response Response { get { throw null; } set { } }
- public Azure.Core.ResponseClassifier ResponseClassifier { get { throw null; } set { } }
- public void Dispose() { }
+ public new Azure.Core.Request Request { get { throw null; } }
+ public new Azure.Response Response { get { throw null; } set { } }
+ public new Azure.Core.ResponseClassifier ResponseClassifier { get { throw null; } set { } }
+ public new Azure.Response? ExtractResponse() { throw null; }
public System.IO.Stream? ExtractResponseContent() { throw null; }
public void SetProperty(string name, object value) { }
- public void SetProperty(System.Type type, object value) { }
public bool TryGetProperty(string name, out object? value) { throw null; }
- public bool TryGetProperty(System.Type type, out object? value) { throw null; }
}
public enum HttpPipelinePosition
{
@@ -542,28 +537,31 @@ void System.ClientModel.Primitives.IJsonModel