Skip to content

WhenAnyPropertyChanged() did'nt work, because Transform() #608

Answered by RolandPheasant
a44281071 asked this question in Q&A
Discussion options

You must be logged in to vote

I see the issue, and there is a fundamental mistake in the sample code. In reactive every subscription creates a new and independent stream .

As an example the code below

var chosen = itemsCache.Connect()
            .Transform(dd => new UserViewModel(dd))
            .AutoRefresh(p => p.IsCamOn)
            .Sort(SortExpressionComparer<UserViewModel>.Descending(e => e.IsCamOn))
            .Page(pager)
            .Do(change => PageParameters.Update(change.Response))
            .ObserveOnDispatcher()

chosen.WhenAnyPropertyChanged()
            .Subscribe(dd => Trace.TraceInformation("WhenAnyPropertyChanged() name = {0}", dd!.Info.Name));

 chosen.Bind(Items)
            .Subscribe();

w…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@a44281071
Comment options

@a44281071
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by a44281071
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants