Fix BooleanToVisibilityConverter parameter handling to support both string and bool types#26
Merged
casuffitsharp merged 2 commits intochore/sq_issuesfrom Mar 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nd bool Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP address feedback on sonar refactor PR
Fix BooleanToVisibilityConverter parameter handling to support both string and bool types
Mar 2, 2026
|
casuffitsharp
added a commit
that referenced
this pull request
Mar 2, 2026
…tring and bool types (#26) * Initial plan * Fix BooleanToVisibilityConverter to handle parameter as both string and bool Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com>
casuffitsharp
added a commit
that referenced
this pull request
Mar 2, 2026
* refactor(sonar): addresses sonarqube issues * [WIP] Update implementation based on feedback from sonar review (#24) * Initial plan * refactor: rename CPU.cs to Cpu.cs to match the Cpu type name Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> * Use pattern matching to eliminate NullReferenceException in OnSelectedProcessChanged (#23) * Initial plan * Use pattern matching instead of unsafe cast in OnSelectedProcessChanged Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> * Rename PCB.cs to Pcb.cs to match declared type name (#22) * Initial plan * Rename PCB.cs to Pcb.cs to match the Pcb class name Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * [WIP] Update PR to resolve SonarQube issues based on feedback (#25) * Initial plan * Fix ConvertBack to parse parameter as string instead of casting to bool Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> * Adjusted #pragma warning restore S2325 placement for clarity. * Fix BooleanToVisibilityConverter parameter handling to support both string and bool types (#26) * Initial plan * Fix BooleanToVisibilityConverter to handle parameter as both string and bool Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: casuffitsharp <78829483+casuffitsharp@users.noreply.github.com> * Performing code cleanup * Use null-conditional when updating prev process state Replaced direct assignment with null-conditional operator for prev.State to prevent possible NullReferenceException if prev is null. --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <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.



ConvertBack(andConvert) would throwInvalidCastExceptionifConverterParameterwas passed as aboolinstead of astring, andbool.Parsewould throwFormatExceptionon any invalid string value.Changes
GetBoolParameterhelper shared by bothConvertandConvertBack, eliminating duplicated parameter-parsing logicboolandstringparameter types via pattern matching — directboolis returned as-is, strings go throughbool.TryParsenulland invalid strings safely returnfalseinstead of throwing💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.