-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow comma separated values (List<T>) for Layout Renderers/Targets/Layouts #1439
Conversation
2e5fb3a
to
c3c91c4
Compare
{ | ||
if (!resultType.IsEnum) | ||
{ | ||
result = null; | ||
return false; | ||
} | ||
|
||
if (resultType.IsDefined(typeof(FlagsAttribute), false)) | ||
if (flagsEnumAllowed && resultType.IsDefined(typeof(FlagsAttribute), false)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if it's a flags-enum, but flagsEnumAllowed
is false? The else-part would then execute with the flags-enum.
Must it not just return false in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a test for parsing a list of values of a flag-enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
Any idea why the test coverage dropped so dramatically? I don't seem to be able to view the codecov diff. |
It did not. 75.30% (+<.01%) compared to 717373a but this PR has "only" 74.29% coverage |
c3c91c4
to
ede2cda
Compare
ede2cda
to
e5b8cbe
Compare
I will remove the ecape and will move to a optional quoted approach, eg. Have to implemented that |
fba3f33
to
8a81b3e
Compare
# supported: - Generic List (List<T>), with the following types: - C# built in types (string, int, double, object) - enum (use shortname) - culture, encoding, Type - not supported: Layout # Not supported: - Arrays - Non-generic List - IList<T> / IList (performance) - IEnumerable<T> / IEnumerable (performance)
8a81b3e
to
61b4a72
Compare
Current coverage is 81% (diff: 96%)@@ master #1439 diff @@
==========================================
Files 277 278 +1
Lines 17780 18230 +450
Methods 2785 2823 +38
Messages 0 0
Branches 2024 2098 +74
==========================================
+ Hits 14332 14748 +416
- Misses 2996 3006 +10
- Partials 452 476 +24
|
Support voor comma separated list,
e.g.
supported:
List<T>
), with the following types:Not supported:
List
IList<T>
/IList
IEnumerable<T>
/IEnumerable
UPDATE support added for
IList<T>
/IList
IEnumerable<T>
/IEnumerable
ISet<T>
/HashSet<T>
Example:
TO DO
This change is