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

Enum combo #158

Merged
merged 8 commits into from
Jan 8, 2025
Merged

Enum combo #158

merged 8 commits into from
Jan 8, 2025

Conversation

Damon3000s
Copy link
Collaborator

Added a Combo implementation that takes an Enum type

@Damon3000s
Copy link
Collaborator Author

Also added IString and String combo implementations while I was there (And IString was my real use case anyway)

private readonly Collection<StrongStringExample> possibleStrongStringValues =
[ "Strong Hello".As<StrongStringExample>(),
"Strong World".As<StrongStringExample>(),
"Strong Goodbye".As<StrongStringExample>()];

Choose a reason for hiding this comment

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

Not sure what the expected convention is here, but you have an opening space for this array and not a closing space

Your other array above doesn't have a space on either side

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes I agree that is a bit weird. Not entirely sure what I was going for but my goal was not to have a really really long line (thanks to the casts). I've updated the code to be formatted differently that resolves this specific concern.

Damon3000s and others added 4 commits January 8, 2025 09:45
- Enum case simplified with less casting
- Use the length of the names array instead of the possible values (even though names are created from possible values)
@matt-edmondson matt-edmondson merged commit 9198718 into ktsu-dev:main Jan 8, 2025
2 checks passed
@Damon3000s Damon3000s deleted the enum-combo branch January 9, 2025 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants