Skip to content

Commit

Permalink
Suppress S3236
Browse files Browse the repository at this point in the history
Suppress S3236 warning.
  • Loading branch information
martincostello committed Sep 15, 2024
1 parent 8da80e5 commit 14b80f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ private void UpdateOriginalContext()
return;
}

#pragma warning disable S3236 // Remove this argument from the method call; it hides the caller information.
Debug.Assert(Tasks.Count(t => t.IsAccepted) == 1, $"There must be exactly one accepted outcome for hedging. Found {Tasks.Count(t => t.IsAccepted)}.");
#pragma warning restore S3236 // Remove this argument from the method call; it hides the caller information.

if (Tasks.FirstOrDefault(static t => t.IsAccepted) is TaskExecution<T> acceptedExecution)
{
Expand Down

0 comments on commit 14b80f0

Please sign in to comment.