Skip to content

Commit

Permalink
Revert "Make retry policy internal" (#32376)
Browse files Browse the repository at this point in the history
* Revert "Make retry policy internal (#32277)"

This reverts commit 97c8baf.

* Export API
  • Loading branch information
JoshLove-msft authored Nov 8, 2022
1 parent 5bec591 commit 0f84eee
Show file tree
Hide file tree
Showing 13 changed files with 235 additions and 12 deletions.
25 changes: 25 additions & 0 deletions sdk/core/Azure.Core/api/Azure.Core.net461.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ protected ClientOptions(Azure.Core.DiagnosticsOptions? diagnostics) { }
public static Azure.Core.ClientOptions Default { get { throw null; } }
public Azure.Core.DiagnosticsOptions Diagnostics { get { throw null; } }
public Azure.Core.RetryOptions Retry { get { throw null; } }
public Azure.Core.Pipeline.HttpPipelinePolicy? RetryPolicy { get { throw null; } set { } }
public Azure.Core.Pipeline.HttpPipelineTransport Transport { get { throw null; } set { } }
public void AddPolicy(Azure.Core.Pipeline.HttpPipelinePolicy policy, Azure.Core.HttpPipelinePosition position) { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
Expand Down Expand Up @@ -462,6 +463,7 @@ public HttpMessage(Azure.Core.Request request, Azure.Core.ResponseClassifier res
public System.Threading.CancellationToken CancellationToken { get { throw null; } }
public bool HasResponse { get { throw null; } }
public System.TimeSpan? NetworkTimeout { get { throw null; } set { } }
public Azure.Core.ProcessingContext 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 { } }
Expand All @@ -481,6 +483,14 @@ public static partial class MultipartResponse
public static Azure.Response[] Parse(Azure.Response response, bool expectCrLf, System.Threading.CancellationToken cancellationToken) { throw null; }
public static System.Threading.Tasks.Task<Azure.Response[]> ParseAsync(Azure.Response response, bool expectCrLf, System.Threading.CancellationToken cancellationToken) { throw null; }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ProcessingContext
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public int RetryNumber { get { throw null; } set { } }
public System.DateTimeOffset StartTime { get { throw null; } set { } }
}
public abstract partial class Request : System.IDisposable
{
protected Request() { }
Expand Down Expand Up @@ -1001,6 +1011,21 @@ public HttpPipelineTransportOptions() { }
public System.Collections.Generic.IList<System.Security.Cryptography.X509Certificates.X509Certificate2> ClientCertificates { get { throw null; } }
public System.Func<Azure.Core.Pipeline.ServerCertificateCustomValidationArgs, bool>? ServerCertificateCustomValidationCallback { get { throw null; } set { } }
}
public abstract partial class RetryPolicy : Azure.Core.Pipeline.HttpPipelinePolicy
{
protected RetryPolicy(Azure.Core.RetryOptions? options = null) { }
protected internal virtual System.TimeSpan CalculateNextDelay(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual System.Threading.Tasks.ValueTask<System.TimeSpan> CalculateNextDelayAsync(Azure.Core.HttpMessage message) { throw null; }
protected static System.TimeSpan GetServerDelay(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual void OnRequestSent(Azure.Core.HttpMessage message) { }
protected internal virtual System.Threading.Tasks.ValueTask OnRequestSentAsync(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual void OnSendingRequest(Azure.Core.HttpMessage message) { }
protected internal virtual System.Threading.Tasks.ValueTask OnSendingRequestAsync(Azure.Core.HttpMessage message) { throw null; }
public override void Process(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { }
public override System.Threading.Tasks.ValueTask ProcessAsync(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { throw null; }
protected internal virtual bool ShouldRetry(Azure.Core.HttpMessage message, System.Exception? exception) { throw null; }
protected internal virtual System.Threading.Tasks.ValueTask<bool> ShouldRetryAsync(Azure.Core.HttpMessage message, System.Exception? exception) { throw null; }
}
public partial class ServerCertificateCustomValidationArgs
{
public ServerCertificateCustomValidationArgs(System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.X509Certificates.X509Chain? certificateAuthorityChain, System.Net.Security.SslPolicyErrors sslPolicyErrors) { }
Expand Down
25 changes: 25 additions & 0 deletions sdk/core/Azure.Core/api/Azure.Core.net5.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ protected ClientOptions(Azure.Core.DiagnosticsOptions? diagnostics) { }
public static Azure.Core.ClientOptions Default { get { throw null; } }
public Azure.Core.DiagnosticsOptions Diagnostics { get { throw null; } }
public Azure.Core.RetryOptions Retry { get { throw null; } }
public Azure.Core.Pipeline.HttpPipelinePolicy? RetryPolicy { get { throw null; } set { } }
public Azure.Core.Pipeline.HttpPipelineTransport Transport { get { throw null; } set { } }
public void AddPolicy(Azure.Core.Pipeline.HttpPipelinePolicy policy, Azure.Core.HttpPipelinePosition position) { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
Expand Down Expand Up @@ -462,6 +463,7 @@ public HttpMessage(Azure.Core.Request request, Azure.Core.ResponseClassifier res
public System.Threading.CancellationToken CancellationToken { get { throw null; } }
public bool HasResponse { get { throw null; } }
public System.TimeSpan? NetworkTimeout { get { throw null; } set { } }
public Azure.Core.ProcessingContext 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 { } }
Expand All @@ -481,6 +483,14 @@ public static partial class MultipartResponse
public static Azure.Response[] Parse(Azure.Response response, bool expectCrLf, System.Threading.CancellationToken cancellationToken) { throw null; }
public static System.Threading.Tasks.Task<Azure.Response[]> ParseAsync(Azure.Response response, bool expectCrLf, System.Threading.CancellationToken cancellationToken) { throw null; }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ProcessingContext
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public int RetryNumber { get { throw null; } set { } }
public System.DateTimeOffset StartTime { get { throw null; } set { } }
}
public abstract partial class Request : System.IDisposable
{
protected Request() { }
Expand Down Expand Up @@ -1001,6 +1011,21 @@ public HttpPipelineTransportOptions() { }
public System.Collections.Generic.IList<System.Security.Cryptography.X509Certificates.X509Certificate2> ClientCertificates { get { throw null; } }
public System.Func<Azure.Core.Pipeline.ServerCertificateCustomValidationArgs, bool>? ServerCertificateCustomValidationCallback { get { throw null; } set { } }
}
public abstract partial class RetryPolicy : Azure.Core.Pipeline.HttpPipelinePolicy
{
protected RetryPolicy(Azure.Core.RetryOptions? options = null) { }
protected internal virtual System.TimeSpan CalculateNextDelay(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual System.Threading.Tasks.ValueTask<System.TimeSpan> CalculateNextDelayAsync(Azure.Core.HttpMessage message) { throw null; }
protected static System.TimeSpan GetServerDelay(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual void OnRequestSent(Azure.Core.HttpMessage message) { }
protected internal virtual System.Threading.Tasks.ValueTask OnRequestSentAsync(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual void OnSendingRequest(Azure.Core.HttpMessage message) { }
protected internal virtual System.Threading.Tasks.ValueTask OnSendingRequestAsync(Azure.Core.HttpMessage message) { throw null; }
public override void Process(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { }
public override System.Threading.Tasks.ValueTask ProcessAsync(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { throw null; }
protected internal virtual bool ShouldRetry(Azure.Core.HttpMessage message, System.Exception? exception) { throw null; }
protected internal virtual System.Threading.Tasks.ValueTask<bool> ShouldRetryAsync(Azure.Core.HttpMessage message, System.Exception? exception) { throw null; }
}
public partial class ServerCertificateCustomValidationArgs
{
public ServerCertificateCustomValidationArgs(System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.X509Certificates.X509Chain? certificateAuthorityChain, System.Net.Security.SslPolicyErrors sslPolicyErrors) { }
Expand Down
25 changes: 25 additions & 0 deletions sdk/core/Azure.Core/api/Azure.Core.net6.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ protected ClientOptions(Azure.Core.DiagnosticsOptions? diagnostics) { }
public static Azure.Core.ClientOptions Default { get { throw null; } }
public Azure.Core.DiagnosticsOptions Diagnostics { get { throw null; } }
public Azure.Core.RetryOptions Retry { get { throw null; } }
public Azure.Core.Pipeline.HttpPipelinePolicy? RetryPolicy { get { throw null; } set { } }
public Azure.Core.Pipeline.HttpPipelineTransport Transport { get { throw null; } set { } }
public void AddPolicy(Azure.Core.Pipeline.HttpPipelinePolicy policy, Azure.Core.HttpPipelinePosition position) { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
Expand Down Expand Up @@ -462,6 +463,7 @@ public HttpMessage(Azure.Core.Request request, Azure.Core.ResponseClassifier res
public System.Threading.CancellationToken CancellationToken { get { throw null; } }
public bool HasResponse { get { throw null; } }
public System.TimeSpan? NetworkTimeout { get { throw null; } set { } }
public Azure.Core.ProcessingContext 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 { } }
Expand All @@ -481,6 +483,14 @@ public static partial class MultipartResponse
public static Azure.Response[] Parse(Azure.Response response, bool expectCrLf, System.Threading.CancellationToken cancellationToken) { throw null; }
public static System.Threading.Tasks.Task<Azure.Response[]> ParseAsync(Azure.Response response, bool expectCrLf, System.Threading.CancellationToken cancellationToken) { throw null; }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ProcessingContext
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public int RetryNumber { get { throw null; } set { } }
public System.DateTimeOffset StartTime { get { throw null; } set { } }
}
public abstract partial class Request : System.IDisposable
{
protected Request() { }
Expand Down Expand Up @@ -1001,6 +1011,21 @@ public HttpPipelineTransportOptions() { }
public System.Collections.Generic.IList<System.Security.Cryptography.X509Certificates.X509Certificate2> ClientCertificates { get { throw null; } }
public System.Func<Azure.Core.Pipeline.ServerCertificateCustomValidationArgs, bool>? ServerCertificateCustomValidationCallback { get { throw null; } set { } }
}
public abstract partial class RetryPolicy : Azure.Core.Pipeline.HttpPipelinePolicy
{
protected RetryPolicy(Azure.Core.RetryOptions? options = null) { }
protected internal virtual System.TimeSpan CalculateNextDelay(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual System.Threading.Tasks.ValueTask<System.TimeSpan> CalculateNextDelayAsync(Azure.Core.HttpMessage message) { throw null; }
protected static System.TimeSpan GetServerDelay(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual void OnRequestSent(Azure.Core.HttpMessage message) { }
protected internal virtual System.Threading.Tasks.ValueTask OnRequestSentAsync(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual void OnSendingRequest(Azure.Core.HttpMessage message) { }
protected internal virtual System.Threading.Tasks.ValueTask OnSendingRequestAsync(Azure.Core.HttpMessage message) { throw null; }
public override void Process(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { }
public override System.Threading.Tasks.ValueTask ProcessAsync(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { throw null; }
protected internal virtual bool ShouldRetry(Azure.Core.HttpMessage message, System.Exception? exception) { throw null; }
protected internal virtual System.Threading.Tasks.ValueTask<bool> ShouldRetryAsync(Azure.Core.HttpMessage message, System.Exception? exception) { throw null; }
}
public partial class ServerCertificateCustomValidationArgs
{
public ServerCertificateCustomValidationArgs(System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.X509Certificates.X509Chain? certificateAuthorityChain, System.Net.Security.SslPolicyErrors sslPolicyErrors) { }
Expand Down
25 changes: 25 additions & 0 deletions sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ protected ClientOptions(Azure.Core.DiagnosticsOptions? diagnostics) { }
public static Azure.Core.ClientOptions Default { get { throw null; } }
public Azure.Core.DiagnosticsOptions Diagnostics { get { throw null; } }
public Azure.Core.RetryOptions Retry { get { throw null; } }
public Azure.Core.Pipeline.HttpPipelinePolicy? RetryPolicy { get { throw null; } set { } }
public Azure.Core.Pipeline.HttpPipelineTransport Transport { get { throw null; } set { } }
public void AddPolicy(Azure.Core.Pipeline.HttpPipelinePolicy policy, Azure.Core.HttpPipelinePosition position) { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
Expand Down Expand Up @@ -462,6 +463,7 @@ public HttpMessage(Azure.Core.Request request, Azure.Core.ResponseClassifier res
public System.Threading.CancellationToken CancellationToken { get { throw null; } }
public bool HasResponse { get { throw null; } }
public System.TimeSpan? NetworkTimeout { get { throw null; } set { } }
public Azure.Core.ProcessingContext 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 { } }
Expand All @@ -481,6 +483,14 @@ public static partial class MultipartResponse
public static Azure.Response[] Parse(Azure.Response response, bool expectCrLf, System.Threading.CancellationToken cancellationToken) { throw null; }
public static System.Threading.Tasks.Task<Azure.Response[]> ParseAsync(Azure.Response response, bool expectCrLf, System.Threading.CancellationToken cancellationToken) { throw null; }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ProcessingContext
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public int RetryNumber { get { throw null; } set { } }
public System.DateTimeOffset StartTime { get { throw null; } set { } }
}
public abstract partial class Request : System.IDisposable
{
protected Request() { }
Expand Down Expand Up @@ -1001,6 +1011,21 @@ public HttpPipelineTransportOptions() { }
public System.Collections.Generic.IList<System.Security.Cryptography.X509Certificates.X509Certificate2> ClientCertificates { get { throw null; } }
public System.Func<Azure.Core.Pipeline.ServerCertificateCustomValidationArgs, bool>? ServerCertificateCustomValidationCallback { get { throw null; } set { } }
}
public abstract partial class RetryPolicy : Azure.Core.Pipeline.HttpPipelinePolicy
{
protected RetryPolicy(Azure.Core.RetryOptions? options = null) { }
protected internal virtual System.TimeSpan CalculateNextDelay(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual System.Threading.Tasks.ValueTask<System.TimeSpan> CalculateNextDelayAsync(Azure.Core.HttpMessage message) { throw null; }
protected static System.TimeSpan GetServerDelay(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual void OnRequestSent(Azure.Core.HttpMessage message) { }
protected internal virtual System.Threading.Tasks.ValueTask OnRequestSentAsync(Azure.Core.HttpMessage message) { throw null; }
protected internal virtual void OnSendingRequest(Azure.Core.HttpMessage message) { }
protected internal virtual System.Threading.Tasks.ValueTask OnSendingRequestAsync(Azure.Core.HttpMessage message) { throw null; }
public override void Process(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { }
public override System.Threading.Tasks.ValueTask ProcessAsync(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { throw null; }
protected internal virtual bool ShouldRetry(Azure.Core.HttpMessage message, System.Exception? exception) { throw null; }
protected internal virtual System.Threading.Tasks.ValueTask<bool> ShouldRetryAsync(Azure.Core.HttpMessage message, System.Exception? exception) { throw null; }
}
public partial class ServerCertificateCustomValidationArgs
{
public ServerCertificateCustomValidationArgs(System.Security.Cryptography.X509Certificates.X509Certificate2? certificate, System.Security.Cryptography.X509Certificates.X509Chain? certificateAuthorityChain, System.Net.Security.SslPolicyErrors sslPolicyErrors) { }
Expand Down
Loading

0 comments on commit 0f84eee

Please sign in to comment.