Improve IDisposable note#12752
Open
gewarren wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates .NET API reference ECMAXML docs to reduce repeated disposal boilerplate in individual types by improving the canonical guidance on System.IDisposable and having implementing types point readers to that section instead.
Changes:
- Refined the guidance and links in
System.IDisposabledocs, including updated section titles and cross-references. - Replaced lengthy per-type “implements IDisposable” boilerplate with shorter text that links back to the
IDisposableremarks. - Cleaned up callout formatting and some Markdown/table formatting in several reference topics.
Reviewed changes
Copilot reviewed 50 out of 52 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| xml/System/IDisposable.xml | Updates IDisposable remarks and adds reusable “Use an object…” guidance (also introduces a new in-page link that needs correction). |
| xml/System.Timers/Timer.xml | Replaces long IDisposable boilerplate with a short pointer to the IDisposable guidance; cleans callout formatting and a Markdown table. |
| xml/System.Threading/WaitHandle.xml | Minor wording update to IDisposable callout (still mentions try/catch, should be try/finally). |
| xml/System.Threading/ReaderWriterLockSlim.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Threading/Mutex.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Threading/CancellationTokenSource.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Threading/AutoResetEvent.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.Security/SecureString.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.Security.Principal/WindowsIdentity.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Security.Cryptography/SHA1CryptoServiceProvider.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.Security.Cryptography/RNGCryptoServiceProvider.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.Security.Cryptography.X509Certificates/X509Store.xml | Replaces per-type boilerplate with pointer to IDisposable guidance (multiple locations). |
| xml/System.Security.Cryptography.X509Certificates/X509Chain.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.Security.Cryptography.X509Certificates/X509Certificate.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Runtime/MemoryFailPoint.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Resources/ResourceWriter.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and removes extra blank lines. |
| xml/System.Resources/ResourceSet.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.Resources/ResourceReader.xml | Replaces per-type boilerplate with pointer to IDisposable guidance (but loses IMPORTANT callout formatting). |
| xml/System.IO/TextWriter.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.IO/TextReader.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.IO/StreamWriter.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.IO/StreamReader.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.IO/Stream.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.IO/FileStream.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.IO/BufferedStream.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and removes extra blank lines. |
| xml/System.IO/BinaryWriter.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and removes extra blank lines. |
| xml/System.IO/BinaryReader.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.IO.IsolatedStorage/IsolatedStorageFileStream.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.IO.IsolatedStorage/IsolatedStorageFile.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Diagnostics/TextWriterTraceListener.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Diagnostics/ProcessThread.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Diagnostics/ProcessModule.xml | Replaces per-type boilerplate with pointer to IDisposable guidance and normalizes callout spacing. |
| xml/System.Diagnostics/Process.xml | Normalizes callout spacing in several NOTE blocks. |
| xml/System.Diagnostics/EventLogEntry.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.Diagnostics/DelimitedListTraceListener.xml | Normalizes callout spacing in several NOTE/IMPORTANT blocks. |
| xml/System.ComponentModel.Composition/ExportLifetimeContext`1.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Primitives/ComposablePartCatalog.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/TypeCatalog.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/ImportEngine.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/FilteredCatalog.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/DirectoryCatalog.xml | Replaces boilerplate with pointer to IDisposable guidance (but loses IMPORTANT callout formatting). |
| xml/System.ComponentModel.Composition.Hosting/CompositionService.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/CompositionScopeDefinition.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/CompositionContainer.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/ComposablePartExportProvider.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/CatalogExportProvider.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/AtomicComposition.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/AssemblyCatalog.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/ApplicationCatalog.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/AggregateExportProvider.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.ComponentModel.Composition.Hosting/AggregateCatalog.xml | Replaces per-type boilerplate with pointer to IDisposable guidance. |
| xml/System.Collections.Concurrent/BlockingCollection`1.xml | Reworks remarks/callout formatting for IDisposable guidance (introduces a missing space between sentences). |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12628.