Skip to content

Commit

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

* rebase
  • Loading branch information
JoshLove-msft authored Nov 3, 2022
1 parent ec43feb commit 97c8baf
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 210 deletions.
25 changes: 0 additions & 25 deletions sdk/core/Azure.Core/api/Azure.Core.net461.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ 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 @@ -463,7 +462,6 @@ 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 @@ -483,14 +481,6 @@ 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 @@ -1011,21 +1001,6 @@ 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: 0 additions & 25 deletions sdk/core/Azure.Core/api/Azure.Core.net5.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ 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 @@ -463,7 +462,6 @@ 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 @@ -483,14 +481,6 @@ 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 @@ -1011,21 +1001,6 @@ 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: 0 additions & 25 deletions sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ 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 @@ -463,7 +462,6 @@ 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 @@ -483,14 +481,6 @@ 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 @@ -1011,21 +1001,6 @@ 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: 0 additions & 25 deletions sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ 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 @@ -463,7 +462,6 @@ 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 @@ -483,14 +481,6 @@ 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 @@ -1011,21 +1001,6 @@ 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 97c8baf

Please sign in to comment.