diff --git a/League/Caching/HtmlToPdfConverter.cs b/League/Caching/HtmlToPdfConverter.cs
index ea825dd..fa19e63 100644
--- a/League/Caching/HtmlToPdfConverter.cs
+++ b/League/Caching/HtmlToPdfConverter.cs
@@ -5,6 +5,10 @@
namespace League.Caching;
+#pragma warning disable S2083 // reason: False positive due to CancellationToken in GetPdfDataBrowser
+#pragma warning disable S2076 // reason: False positive due to CancellationToken in GetPdfDataBrowser
+#pragma warning disable CA3003 // reason: False positive due to CancellationToken in GetPdfDataBrowser
+
///
/// The class to create PDF files from HTML content.
/// For converting HTML to PDF, it uses either a Browser command line or .
@@ -70,12 +74,8 @@ private void EnsureTempFolder(string tempFolder)
{
var tmpPdfFile = await CreatePdfDataBrowser(tmpHtmlPath, cancellationToken);
-#pragma warning disable S2083 // reason: False positive due to CancellationToken in GetPdfDataBrowser
-#pragma warning disable CA3003 // reason: False positive due to CancellationToken in GetPdfDataBrowser
if (tmpPdfFile != null && File.Exists(tmpPdfFile))
return await File.ReadAllBytesAsync(tmpPdfFile, cancellationToken);
-#pragma warning restore S2083 // reason: False positive due to CancellationToken in GetPdfDataBrowser
-#pragma warning restore CA3003 // reason: False positive due to CancellationToken in GetPdfDataBrowser
_logger.LogError("Error creating PDF file with Browser");
return null;
@@ -196,3 +196,6 @@ public void Dispose()
}
}
+#pragma warning restore S2083 // reason: False positive due to CancellationToken in GetPdfDataBrowser
+#pragma warning restore S2076 // reason: False positive due to CancellationToken in GetPdfDataBrowser
+#pragma warning restore CA3003 // reason: False positive due to CancellationToken in GetPdfDataBrowser
diff --git a/League/Caching/ReportSheetCache.cs b/League/Caching/ReportSheetCache.cs
index 62b0a91..b94fd3b 100644
--- a/League/Caching/ReportSheetCache.cs
+++ b/League/Caching/ReportSheetCache.cs
@@ -9,6 +9,7 @@
namespace League.Caching;
#pragma warning disable S2083 // reason: False positive due to CancellationToken in GetOrCreatePdf
+#pragma warning disable S2076 // reason: False positive due to CancellationToken in GetOrCreatePdf
#pragma warning disable CA3003 // reason: False positive due to CancellationToken in GetOrCreatePdf
///
@@ -125,4 +126,5 @@ private static string CreateTempPathFolder()
}
}
#pragma warning restore CA3003
+#pragma warning disable S2076
#pragma warning restore S2083