-
Notifications
You must be signed in to change notification settings - Fork 13
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
Working with 2 dependent ObservableCaches #2
Comments
From what I can understand you have a source collection with all the items and you want to filter the items into two separate caches? In that case you can try something like this:
|
sorry for my poor description.
Each tag has a condition, like "Item.Quantity > 10". So any changes to the Item or Tag Condition will need re-evaluation of everything. |
Maybe the ForEachChange() operator can come to the rescue |
Scenario: Tagging Items
2 caches: SourceCache, SourceCache
When item changes, it needs to go thru the list of tags to determine which one applies to it.
Similarly, when tag changes, retagging needs to occur.
First not so reactive attempt:
var disposable = tagsCache.Connect().Flatten().Subscribe(change =>
{
Tag tag = change.Current;
});
var disposable2 = _itemCache.Connect().WhereReasonsAre(ChangeReason.Add, ChangeReason.Update).Flatten().Subscribe(change =>
{
Item item = change.Current;
});
The text was updated successfully, but these errors were encountered: