Skip to content

Commit 5dd76e3

Browse files
Suppress CA1063 / CA2213 on the ported ResXResourceWriter.
ResXResourceWriter is a verbatim port of the Mono implementation (see file header). Both warnings are about deliberate decisions in the upstream port that we preserve for fidelity: * CA1063 — Dispose() is virtual and the protected Dispose(bool) isn't, the inverse of the canonical pattern. Mono shape kept. * CA2213 — the writer's stream / textwriter fields are caller-owned and intentionally not disposed by the writer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d38a4fd commit 5dd76e3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ICSharpCode.Decompiler/Util/ResXResourceWriter.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
// includes code by Mike Krüger and Lluis Sanchez
3232

3333
using System;
34+
using System.Diagnostics.CodeAnalysis;
3435
using System.Globalization;
3536
using System.IO;
3637
using System.Text;
@@ -40,6 +41,10 @@
4041

4142
namespace ICSharpCode.Decompiler.Util
4243
{
44+
[SuppressMessage("Usage", "CA1063:Implement IDisposable Correctly",
45+
Justification = "Ported from the Mono ResXResourceWriter implementation; preserved verbatim for fidelity with the upstream.")]
46+
[SuppressMessage("Usage", "CA2213:Disposable fields should be disposed",
47+
Justification = "By design: the writer doesn't own the underlying stream/textwriter passed in by the caller. Mono behavior preserved.")]
4348
#if INSIDE_SYSTEM_WEB
4449
internal
4550
#else

0 commit comments

Comments
 (0)