Replies: 1 comment 1 reply
-
There is no deterministically way to batch the results into a single change set as the code cannot know when
This is true for However there is a slightly less scientific way which is to use a time based buffer. Something like this: compositeTopicSourceList.Connect()
.Or()
.TransformMany(x => x)
.Buffer(TimeSpan.FromMilliseconds(150)) // Buffer by time, and experiment with period
.FlattenBufferResult() // Flatten the nested result Sorry for the delay in answering but I do not receive notifications for discussion threads -> there must be a setting some where. I'll take a look, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following interface
And the following classes:
What I want to achieve is an observable composite collection where collections are added or removed dynamically.
I have tried this with the following code:
This works, but it produces two change sets when editing
compositeTopicSourceList
. I want to flatten the list and only have a single change set (to reduce unnecessary overhead).It almost works if I change
compositeTopicSourceList
observable to the following:However, no change set is produced when adding a new topic to the collection
topicASourceCache
.Actually, If I use
SourceList
instead ofSourceCache
for my composite collection, everything works as I want it to (single change set when editing and change set produced on new topic added):Any advice on how to achieve a single change set when using composite collection with SourceCache?
Beta Was this translation helpful? Give feedback.
All reactions