Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SA1625 #2

Merged
merged 5 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion src/Polly/Bulkhead/AsyncBulkheadSyntax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization)
/// <returns>The policy instance.</returns>
/// <exception cref="ArgumentOutOfRangeException">maxParallelization;Value must be greater than zero.</exception>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="onBulkheadRejectedAsync"/> is <see langword="null"/>.</exception>
/// <returns>The policy instance.</returns>
public static AsyncBulkheadPolicy BulkheadAsync(int maxParallelization, Func<Context, Task> onBulkheadRejectedAsync) =>
BulkheadAsync(maxParallelization, 0, onBulkheadRejectedAsync);

Expand Down
2 changes: 1 addition & 1 deletion src/Polly/Bulkhead/BulkheadSyntax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static BulkheadPolicy Bulkhead(int maxParallelization, int maxQueuingActi
/// <param name="onBulkheadRejected">An action to call, if the bulkhead rejects execution due to oversubscription.</param>
/// <returns>The policy instance.</returns>
/// <exception cref="ArgumentOutOfRangeException">maxParallelization;Value must be greater than zero.</exception>
/// <exception cref="ArgumentOutOfRangeException">maxParallelization;Value must be greater than zero.</exception>
/// <exception cref="ArgumentOutOfRangeException">maxParallelization;Value must be greater than or equal to zero.</exception>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="onBulkheadRejected"/> is <see langword="null"/>.</exception>
public static BulkheadPolicy Bulkhead(int maxParallelization, int maxQueuingActions, Action<Context> onBulkheadRejected)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Polly/Polly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<NoWarn>$(NoWarn);IDE0011;S3872;SA1402;SA1414;S3215</NoWarn>
<NoWarn>$(NoWarn);IDE1006;CA1062;S107;CA1068;S4039;CA1000;CA1063;CA1031;CA1051</NoWarn>
<NoWarn>$(NoWarn);CA2211;S2223;CA1032;CA1815;CA1816;S4457;SA1615;CA1033</NoWarn>
<NoWarn>$(NoWarn);S4023;CA1010;S3442;CA1064;SA1649;SA1625;SA1623;SA1118</NoWarn>
<NoWarn>$(NoWarn);S4023;CA1010;S3442;CA1064;SA1649;SA1623;SA1118</NoWarn>
<NoWarn>$(NoWarn);S3971;CA1724;CA1716;SA1108;CA1710;S4049;S3246</NoWarn>
<NoWarn>$(NoWarn);CA1805</NoWarn>

<!--Pulic API Analyzers: We do not need to fix these as it would break compatibility with released Polly versions-->
<!--Public API Analyzers: We do not need to fix these as it would break compatibility with released Polly versions-->
<NoWarn>$(NoWarn);RS0037;</NoWarn>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/Polly/Timeout/AsyncTimeoutSyntax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, Func<Context, TimeSpa
/// <remarks>The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out.</remarks></param>
/// <returns>The policy instance.</returns>
/// <exception cref="ArgumentOutOfRangeException">seconds;Value must be greater than zero.</exception>
/// <exception cref="ArgumentNullException">seconds;Value must be greater than zero.</exception>
/// <exception cref="ArgumentNullException">seconds;Value must not be null.</exception>
public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Task> onTimeoutAsync)
{
TimeoutValidator.ValidateSecondsTimeout(seconds);
Expand All @@ -95,7 +95,7 @@ public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeo
/// <remarks>The Task parameter will be null if the executed action responded cooperatively to cancellation before the policy timed it out.</remarks></param>
/// <returns>The policy instance.</returns>
/// <exception cref="ArgumentOutOfRangeException">seconds;Value must be greater than zero.</exception>
/// <exception cref="ArgumentNullException">seconds;Value must be greater than zero.</exception>
/// <exception cref="ArgumentNullException">seconds;Value must not be null.</exception>
public static AsyncTimeoutPolicy TimeoutAsync(int seconds, TimeoutStrategy timeoutStrategy, Func<Context, TimeSpan, Task, Exception, Task> onTimeoutAsync)
{
if (seconds <= 0)
Expand Down
Loading