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

Enumify Flags in HasFlag/SetFlag Extension Methods #42

Open
hf-kklein opened this issue Dec 1, 2020 · 0 comments
Open

Enumify Flags in HasFlag/SetFlag Extension Methods #42

hf-kklein opened this issue Dec 1, 2020 · 0 comments

Comments

@hf-kklein
Copy link
Collaborator

public bool HasFlagSet(string flagKey)

In an ideal world, the methods for setting/nulling/reading flags should only accept Enum-Values (bonus: only those with an Flags-Attribute).
ToDo: Make the public method generic enough to consume only enums, not strings. The internal/private methods might still use strings because, as the flags are stored in a Dictionary<string,JToken> (constraint by JSON.Net), the keys are ultimately stored as strings in the UserProperties.

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

No branches or pull requests

1 participant