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

Use HashSet or flags for choices #101

Open
Arithmomaniac opened this issue Jun 8, 2018 · 1 comment
Open

Use HashSet or flags for choices #101

Arithmomaniac opened this issue Jun 8, 2018 · 1 comment

Comments

@Arithmomaniac
Copy link
Collaborator

Right now, a choice list is a List<T>. This doesn't ensure that the selected choices are unique, and could lead to strange behavior and/or failed API calls if a choice is added to the list multiple times.

We should use either flag enums instead (and then the choice list can just be of type T), or the choice list should be a HashSet<T> instead.

I favor using HashSet.

@Arithmomaniac
Copy link
Collaborator Author

Arithmomaniac commented Jun 11, 2018

We could also just ensure people could use whatever ICollection<T> they want - which would not be a breaking change after all.

@mrobustelli mrobustelli added this to Prioritized in Issue Prioritization Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Issue Prioritization
  
Prioritized
Development

No branches or pull requests

1 participant