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

TikEntityPropertyAccessor.ConvertFromString logic wrong for enum with mutiple flags set #79

Open
cbagpipe opened this issue Jan 19, 2021 · 0 comments
Assignees

Comments

@cbagpipe
Copy link

cbagpipe commented Jan 19, 2021

Filter rule connection-state property contains three flags, but Where() selector uses string.Equals(), so no items will be selected

изображение

.Where(en => string.Equals(PropertyType.GetMember(en)[0].GetCustomAttribute<TikEnumAttribute>(false).Value, strValue, StringComparison.OrdinalIgnoreCase))
#else
else if (PropertyType.GetTypeInfo().IsEnum)
return Enum.GetNames(PropertyType)
.Where(en => string.Equals(PropertyType.GetRuntimeField(en).GetCustomAttribute<TikEnumAttribute>(false).Value, strValue, StringComparison.OrdinalIgnoreCase))

@danikf danikf self-assigned this Aug 22, 2021
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

2 participants