Dennis Buduev

Dennis Buduev dbuduev

Niner since 2009

Comments

  • Writing your first Rx Application

    Manual helped. ObserveOn has to be used instead.

    var xs = Observable.Interval(TimeSpan.FromSeconds(1)); 
    xs.ObserveOn(SynchronizationContext.Current).Subscribe(value => TextBlock.Text = value.ToString());
    

  • Writing your first Rx Application

    Hi guys!

    I've problems with the sample from this video. Current Rx version has no Observable.Context property. Could you please tell me how this code should be rewritten? I played with SubscribeOn....

    var xs = Observable.Interval(TimeSpan.FromSeconds(1)). SubscribeOn(SynchronizationContext.Current);
    xs.Subscribe(value => TextBlock.Text = value.ToString());
    

    , but still have exception 'The calling thread cannot access this object because a different thread owns it'.

     

    Thanks