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 Aug 14, 2024
1 parent 0d249c4 commit a374368
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 a374368

Please sign in to comment.