We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I could use a non-generic EnumDehumanizeExtensions.DehumanizeTo for when the enum type isn't known at compile time.
I wrote my own which I use in my HumanizedEnumConverter: https://rapiddevbookcode.codeplex.com/SourceControl/latest#LLBL Pro v4.1/AW.Helper/TypeConverters/HumanizedEnumConverter.cs
e.g.
private static Enum DehumanizeTo(string input, Type enumType) { var values = Enum.GetValues(enumType); foreach (var value in values) { var enumValue = value as Enum; if (enumValue == null) return null; if (string.Equals(enumValue.Humanize(), input, StringComparison.OrdinalIgnoreCase)) return enumValue; } return null; }
The text was updated successfully, but these errors were encountered:
added non-generic DehumanizeTo - addresses #92
6eb9f93
Thanks - yeah I think that could be useful at times.
I would appreciate if you could please review #93 for this.
Sorry, something went wrong.
Merge pull request #93 from MehdiK/DehumanizeTo
4ff641a
No branches or pull requests
I could use a non-generic EnumDehumanizeExtensions.DehumanizeTo for when the enum type isn't known at compile time.
I wrote my own which I use in my HumanizedEnumConverter:
https://rapiddevbookcode.codeplex.com/SourceControl/latest#LLBL Pro v4.1/AW.Helper/TypeConverters/HumanizedEnumConverter.cs
e.g.
The text was updated successfully, but these errors were encountered: