Skip to content

feat - Support 'Ignore Case' in TryParseFast#128

Open
iiiixxl wants to merge 1 commit intoEngRajabi:masterfrom
iiiixxl:feat-issue-#121
Open

feat - Support 'Ignore Case' in TryParseFast#128
iiiixxl wants to merge 1 commit intoEngRajabi:masterfrom
iiiixxl:feat-issue-#121

Conversation

@iiiixxl
Copy link
Copy Markdown

@iiiixxl iiiixxl commented Feb 18, 2025

According to #121, the source generator code was modified to support the use of string.Compare as expected by the user.

Generator result:
image

Source code:
image

Unit test:
image

BenchMark result:
image

@EngRajabi EngRajabi requested a review from Copilot April 15, 2025 10:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

Comments suppressed due to low confidence (2)

test/Console.Test.Benchmark/Program.cs:168

  • [nitpick] The method name 'Parse_CaseInsensitive_Ordinal' suggests a case-insensitive parse, but using StringComparison.Ordinal is case-sensitive. Consider renaming the method or adjusting the comparison parameter for clarity.
UserTypeEnumExtensions.TryParseFast("men", out _, StringComparison.Ordinal);

Supernova.Enum.Generators/EnumSourceGenerator.cs:452

  • [nitpick] The parameter name 'states' is unclear in this context; consider renaming it to 'input' or 'value' to better reflect its purpose.
public static bool {SourceGeneratorHelper.ExtensionMethodNameTryParse}(string states, out {symbol.FullName()} result,StringComparison comparisonType)

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