From 595e3adf984dbf77962c662ac8bddfc339887a92 Mon Sep 17 00:00:00 2001 From: ShawnWu33 Date: Mon, 7 Oct 2024 14:43:56 +1100 Subject: [PATCH] Supress S4039, CA1010 in Context.Dictionary --- src/Polly/Context.Dictionary.cs | 2 +- src/Polly/Context.cs | 1 + src/Polly/Polly.csproj | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Polly/Context.Dictionary.cs b/src/Polly/Context.Dictionary.cs index 6e9d70007bf..b1fb9c18bbc 100644 --- a/src/Polly/Context.Dictionary.cs +++ b/src/Polly/Context.Dictionary.cs @@ -1,6 +1,6 @@ namespace Polly; -#pragma warning disable CA1033 // Interface methods should be callable by child types +#pragma warning disable CA1033,S4039 // Interface methods should be callable by child types /// /// Context that carries with a single execution through a Policy. Commonly-used properties are directly on the class. Backed by a dictionary of string key / object value pairs, to which user-defined values may be added. diff --git a/src/Polly/Context.cs b/src/Polly/Context.cs index 0a17675cee0..0040eff5431 100644 --- a/src/Polly/Context.cs +++ b/src/Polly/Context.cs @@ -4,6 +4,7 @@ namespace Polly; /// Context that carries with a single execution through a Policy. Commonly-used properties are directly on the class. Backed by a dictionary of string key / object value pairs, to which user-defined values may be added. /// Do not re-use an instance of across more than one call through .Execute(...) or .ExecuteAsync(...). /// +#pragma warning disable CA1010 // Collections should implement generic interface #pragma warning disable CA1710 // Identifiers should have correct suffix public partial class Context #pragma warning restore CA1710 diff --git a/src/Polly/Polly.csproj b/src/Polly/Polly.csproj index 088aa31f400..3a15d8cba4d 100644 --- a/src/Polly/Polly.csproj +++ b/src/Polly/Polly.csproj @@ -7,8 +7,8 @@ Library 70 true - $(NoWarn);CA1010;CA1031;CA1051;CA1063;CA1064;CA1724; - $(NoWarn);S2223;S3215;S4039 + $(NoWarn);CA1031;CA1051;CA1063;CA1064;CA1724; + $(NoWarn);S2223;S3215; $(NoWarn);RS0037;