-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
[Bug]: SourceCache with Sample and TransformWithInlineUpdate throws DynamicData.MissingKeyException #955
Comments
Props for minimum repro. I'll take a look this weekend. |
Sample is not supported by Dynamic Data. |
Thanks for your explanation. So what is the replacement of I have searched DynamicData operators, and now I'm using For example, the timer produce And is there a documentation for the unsupported standard rx operators? I think this will save a lot of time for newcomers. |
Batch is basically a buffer which captures all changes within a specified time period and flattens the changes back out into a single change set. This is important because dynamic data relies on changes being captured in sequence, otherwise it cannot determine what is an add, an update or remove. Sample on the other hand will skip changes and therefore violates the concept of a chabgeset |
I think the equivalent of sample would be like batch but to produce a unique a change set of unique changes per key within a change set. This is possible, but I am away from my laptop this weekend. I'll post a snippet early next week. |
So |
Native |
Describe the bug 🐞
SourceCache
withSample
andTransformWithInlineUpdate
throwsDynamicData.MissingKeyException
with message "1 is not found."Sample
withTransform
works well, but I need inline update to ensure correct selection behavior inDataGrid
control.And I find that if difference of elapse of
Timer
andSample
is small like this:it won't throw the exception, sometimes, maybe first run works well but stop and re-run throws. If elapse of
Timer
is greater thanSample
it won't throw.I have uploaded the minimum console project.
Step to reproduce
Reproduction repository
https://github.com/ethpch/DynamicData.Test
Expected behavior
Sample
withTransformWithInlineUpdate
works as expected.Screenshots 🖼️
IDE
Visual Studio 2022
Operating system
Windows
Version
23H2, 22631.4317
Device
Desktop
DynamicData Version
9.0.4
Additional information ℹ️
No response
The text was updated successfully, but these errors were encountered: