Skip to content

Cleanup ExceptionConversionHandlers #400

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

Merged
merged 1 commit into from
Mar 24, 2025

Conversation

olegsych
Copy link
Member

@olegsych olegsych commented Mar 22, 2025

To improve readability of the code, make type names more descriptive:

  • Rename the internal V2.Runtime.ExceptionConversionHandler to ExceptionSerializer
  • Rename the internal V2.Client.ExceptionConversionHandler to ExceptionDeserializer

In types that were already affected by this change, perform additional opportunistic cleanup using primarily Visual Studio tooling and without changing the structure of the code.

To simplify code analysis, lock down internal types:

  • Make internal types sealed, where possible
  • Make unused members of internal types private
  • Make fields readonly where possible
  • Use IEnumerable<> instead of List<> to reduce the risk of unintended modification

To improve readability

  • Use explicit type where variable type doesn't appear explicitly in the initialization statement
  • Move using directives above namespace, consistently with the .NET coding style instead of inside the namespace style used with C++
  • Remove generated comments that duplicate information already available in the code

@olegsych olegsych enabled auto-merge (squash) March 22, 2025 00:43
@olegsych olegsych merged commit 8c4e105 into develop Mar 24, 2025
2 checks passed
@olegsych olegsych deleted the user/olegsych/ExceptionSerializationCleanup branch March 24, 2025 10:07
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.

2 participants