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

Optimize dictionary usage and improve code readability #949

Merged

Conversation

vb2ae
Copy link
Member

@vb2ae vb2ae commented Dec 18, 2024

Updated MessageBinder.cs:

  • Modified SpecialValues dictionary initialization for consistent formatting and alignment.
  • Optimized custom converter checks using TryGetValue for better performance and readability.
  • Adjusted conditional compilation blocks for enum type checks for improved readability and consistency across platforms.

Updated FrameAdapter.cs:

  • Simplified ResumeStateAsync method by using TryGetValue for dictionary lookups, enhancing performance.
  • Streamlined CurrentParameter assignment with TryGetValue for efficiency.

Updated MessageBinder.cs:
- Modified SpecialValues dictionary initialization for consistent formatting and alignment.
- Optimized custom converter checks using TryGetValue for better performance and readability.
- Adjusted conditional compilation blocks for enum type checks for improved readability and consistency across platforms.

Updated FrameAdapter.cs:
- Simplified ResumeStateAsync method by using TryGetValue for dictionary lookups, enhancing performance.
- Streamlined CurrentParameter assignment with TryGetValue for efficiency.
@vb2ae vb2ae linked an issue Dec 18, 2024 that may be closed by this pull request
1 task
@vb2ae vb2ae requested review from Copilot and KasperSK December 18, 2024 00:12

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

@vb2ae vb2ae merged commit a9397a8 into master Dec 19, 2024
4 checks passed
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.

Fix code scanning alert - Inefficient use of ContainsKey
2 participants