Commit 3ebe107
fix: handle EnumParameter<T> in Style.FromAttributes reflection
Style.FromAttributes used Convert.ChangeType which cannot convert
strings to EnumParameter<T>. Added pattern match for generic
EnumParameter<> types that parses the underlying enum and creates
the wrapper via Activator.CreateInstance. Also removed unnecessary
Convert.ChangeType call since all branches now produce correctly
typed values.
Fixes: DataList InlineHeaderStyle tests (2 failures on CI)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ba79088 commit 3ebe107
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| 74 | + | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
70 | | - | |
| 79 | + | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
| |||
0 commit comments