stillbuster.blogg.se

Ipartition case insensative
Ipartition case insensative





ipartition case insensative
  1. Ipartition case insensative full#
  2. Ipartition case insensative code#
ipartition case insensative

Also I don't really care for what happens to dataObject equivalents, because they are readonly and are their purpose is to just carry the damn data. That's why there's whole linq pipeline to select whatever they want. The data source is stream-ish, and client are perfectly aware that it can't be enumerated twice. I'm not changing it for reasons, but in this case it isn't really a problem.

Ipartition case insensative code#

This strange two-stage portion was initially a iterator method, with even stranger code inside. Well, I'm kinda surprised of such elaborative answer, explaining why example repro code is wrong. TryGetLast(IEnumerable, out bool) and TryGetFirst(IEnumerable, out bool) code that now looks like:.Althought implementation of SelectIPartitionIterator, EnumerablePartition and respective TryGetLast() or TryGetFirst() methods of Enumerable are negligible detail, it does influence behavior of calls, and as such it should be mentioned somewhere in docs.Since now I know about this quirk, i can fix my calls, but consumers of my code may not have even slightest idea why their data is missing.

Ipartition case insensative full#

Even if i put full fetching code inside Foo(), it being called after Disposal completely invalidates this workaround.

ipartition case insensative

When no next call is made, this fetching is done in Dispose, at last point where it could be done, and then data source is closed. Also, in my case, enumerator fetches data headers in MoreNext() before returning, and in next call it decides whether to fetch full data based on call in Foo(). selector function is run after a call to Dispose() on enumerator and it's problematic because it does not comply will exprected behavior of something disposable - it usually is usuable and its data unavailable. is more suitable for such optimisation, but it's not a problem, 2: limit does not exist, and it's weird because 5.Also some of them use optimisations, which limit number of calls of selector (to 1, by calling only on 5th): Last() Īll of them should return the same element with Foo() selector applied, and it happens.







Ipartition case insensative