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

Removes sealed from a number of classes and respects empty strings in enummember #985

Merged
merged 5 commits into from
Sep 26, 2024

Conversation

EdwardCooke
Copy link
Collaborator

Fixes #982
Fixes #983
Fixes #984

@EdwardCooke EdwardCooke merged commit 7923dd8 into aaubry:master Sep 26, 2024
1 check passed
@@ -210,7 +210,7 @@ private void HandleEnum(ITypeSymbol type)
if (enumMember != null)
{
var argument = enumMember.NamedArguments.FirstOrDefault(x => x.Key == "Value");
if (!string.IsNullOrWhiteSpace(argument.Value.Value as string))
if ((argument.Value.Value as string) != null)
Copy link

Choose a reason for hiding this comment

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

Why not is string?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I actually could have gotten rid of the string check altogether since I’m just checking if it’s null. The value property there is always going to be either null or a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants