From 14b80f070e04cce654bc61e8478acb39e074126b Mon Sep 17 00:00:00 2001 From: martincostello Date: Wed, 14 Aug 2024 11:05:36 +0100 Subject: [PATCH] Suppress S3236 Suppress S3236 warning. --- src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs b/src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs index f1c580fe41d..36b01b1c68b 100644 --- a/src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs +++ b/src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs @@ -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 acceptedExecution) {