ResXResourceWriter is a verbatim port of the Mono implementation
(see file header). Both warnings flag deliberate decisions in the
upstream port that we preserve for fidelity:
* CA1063 — Dispose() is virtual and the protected Dispose(bool) is
not, the inverse of the canonical pattern; keeping the Mono shape.
* 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>
In newer runtime versions, MemoryStream is no longer a serializable type like it was in .NET Framework. This means explicit support has to be implemented for it.
Also, move the .resources->.resx conversion into the base class.
Now that we have our own ResXWriter implementation, there's no longer any reason to keep this specific to ILSpy.