You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume that proper workaround for now is calling ToList before adapting:
GetMyObjects().ToList().Adapt<MyObject[]>();
DaniilPalii
changed the title
IEnumerable is enumerating twice when adaptet to array
IEnumerable is enumerating twice when adapted to array
Oct 6, 2020
Thanks for reporting. Problem with array is we need to know array size before creating array, so it create extra enumerable access because enumerable has no Count method. I will check how to solve this problem.
When adapting IEnumerable to an array, it's adapted twice.
Example of code:
Result of executing: 2.
Expected result: 1.
Version: 6.5.0.
The text was updated successfully, but these errors were encountered: