Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup: Phase 1 #1785

Merged
merged 25 commits into from
Jun 27, 2021
Merged

Code cleanup: Phase 1 #1785

merged 25 commits into from
Jun 27, 2021

Conversation

NickCraver
Copy link
Collaborator

@NickCraver NickCraver commented Jun 27, 2021

Tidying up for newer C# versions and removing old cruft:

  • Removing unneeded pragmas (e.g. transitive obsoletes)
  • Switch expressions
  • Expression body usages, where it's cleaner with new switch expressions
  • Statics where useful to remove virtual calls
  • A handful of pattern matching usages where we were repeat casting
  • StringBuilder optimizations for .NET Core (single char appends)
  • Suppression fixes for contention between frameworks
  • Suppression additions for dupe enum values (that are there for compat)
  • Fix messages/arguments for many argument exceptions
  • Re-enables the GC test (was the only skipped one - no longer needed)
  • Misc compiler warning fixes
  • Fixes KestrelRedisServer's conflict with System.Runtime.CompilerServices.Unsafe

These are broken up by commit for an easier review, but didn't want to make 12 PRs for some maintenance catch-up.

Note: this does not fix all informational message, including a few suspects for actual issues and some that are the way we structure Dispose() => Dispose(true) in a few files. Given those may change functionality, will do a follow-up PR there. This is meant to get all the noise gone and general cleanup without any significant impact anywhere.

@NickCraver NickCraver marked this pull request as ready for review June 27, 2021 17:19
@NickCraver NickCraver merged commit 51d2946 into main Jun 27, 2021
@NickCraver NickCraver deleted the craver/cleanup-1 branch June 27, 2021 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant