Cleanup | Sort Modifiers#4412
Open
benrr101 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Normalizes declaration modifier ordering across SqlClient implementation code to improve consistency and readability, without changing behavior or public surface area.
Changes:
- Reorders C# modifiers to a consistent style (e.g.,
internal static,protected override,public new,private static readonly). - Applies minor whitespace cleanup in a few comments/blank lines while preserving content.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStaticMethods.cs | Reorders internal static modifiers; minor comment whitespace normalization. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs | Reorders class modifiers (internal sealed). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSafeHandles.windows.cs | Reorders override modifiers (protected override). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUtil.cs | Reorders internal static methods and internal sealed class declaration. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlSymmetricKeyCache.cs | Reorders class modifiers (internal sealed). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlStream.cs | Reorders class modifiers and minor comment whitespace cleanup. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlSequentialTextReader.cs | Reorders class modifiers; removes stray whitespace-only line. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlRowUpdatingEvent.cs | Reorders new/override modifiers for properties. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlRowUpdatedEvent.cs | Reorders new modifier for property. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlReferenceCollection.cs | Reorders class modifiers and static readonly field modifiers. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlQueryMetadataCache.cs | Reorders class modifiers (internal sealed). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalTransaction.cs | Reorders class modifiers; trims whitespace in a string.Format line. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInfoMessageEvent.cs | Reorders override modifiers (public override). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlException.cs | Reorders override modifiers (public override). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.cs | Reorders many member modifiers (public override, internal virtual, etc.). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs | Reorders new/override modifiers on members. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionOptions.cs | Reorders internal static method modifiers. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs | Reorders new/override modifiers on members. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCachedBuffer.cs | Reorders override modifiers; minor comment whitespace cleanup. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SmiMetaData.cs | Reorders expression-bodied property formatting and internal virtual order; minor comment whitespace cleanup. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs | Reorders static readonly field modifiers; trims trailing spaces in comment and signature spacing. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolGroup.cs | Reorders class modifiers (internal sealed). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolAuthenticationContextKey.cs | Reorders class modifiers (internal sealed). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolAuthenticationContext.cs | Reorders class modifiers (internal sealed). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/ProviderBase/DbReferenceCollection.cs | Reorders abstract member modifiers (public abstract, protected abstract). |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/NameValuePair.cs | Reorders private readonly field modifiers. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/IpAddressPreferenceUtilities.cs | Reorders static readonly field modifiers; trims trailing whitespace in XML doc. |
| src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs | Reorders private static and internal static method modifiers. |
| src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs | Reorders class/override modifiers (internal sealed, protected override). |
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.
Description
While waiting on some 🤖 analysis, I was looking through my old branches to see what's worth keeping what's too outdated to keep around. This was one of those branches I had intended to send out but never did. It's a very simple PR that just happens to touch about 107 lines of code.
Much of the original codebase contained "inconsistent" declaration modifiers. This PR cleans them up so that they are all in consistent order. I completely ignored all other possible changes except for these, so it should be a quick skim to approve it.
Testing
Everything still compiles. There are no functional changes, just syntactic cleanup, so pr pipeline should be sufficient.